Skip to content
This repository has been archived by the owner on Jun 13, 2024. It is now read-only.

Commit

Permalink
Fix Pylint violations W0511
Browse files Browse the repository at this point in the history
  • Loading branch information
sopel committed Apr 15, 2013
1 parent bbdbafa commit d75f912
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions botocross/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def create_arn(iam, service, region, resource):
account = accountInfo.describe()
return 'arn:aws:' + service + ':' + region + ':' + account.id + ':' + resource

# TODO: refactor to argparse custom action for inline usage!
# REVIEW: refactor to argparse custom action for inline usage?!
def build_filter(filter_args, exclude_args):
return {'filters': build_filter_params(filter_args), 'excludes': build_filter_params(exclude_args)}

Expand All @@ -66,7 +66,7 @@ def build_filter_params(filter_args):

def build_common_parser():
parser = argparse.ArgumentParser(add_help=False)
parser.add_argument("-v", "--verbose", action='store_true') # TODO: drop in favor of a log formatter?!
parser.add_argument("-v", "--verbose", action='store_true') # REVIEW: drop in favor of a log formatter?!
parser.add_argument("--access_key_id", dest='aws_access_key_id', help="Your AWS Access Key ID")
parser.add_argument("--secret_access_key", dest='aws_secret_access_key', help="Your AWS Secret Access Key")
parser.add_argument("-l", "--log", dest='log_level', default='WARNING',
Expand Down Expand Up @@ -107,12 +107,12 @@ def filter_regions(regions, region):
regions = filter(lambda x: is_region_selected(x, region), regions)
return regions

# TODO: remove this S3 legacy induced partial duplication, if possible.
# REVIEW: remove this S3 legacy induced partial duplication, if possible.
def is_region_selected_s3(region, name):
from botocross.s3 import RegionMap
return True if RegionMap[region].find(name) != -1 else False

# TODO: remove this S3 legacy induced partial duplication, if possible.
# REVIEW: remove this S3 legacy induced partial duplication, if possible.
def filter_regions_s3(regions, region):
if region:
botocross_log.info("... (filtered by S3 region '" + region + "')")
Expand Down
2 changes: 1 addition & 1 deletion botocross/iam/accountinfo.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ def describe(self, user=None):
raise
self.log.debug(e.error_message)
try:
# TODO: there should be a better way to retrieve the account id, which is 'leaked in the exception anyway
# REVIEW: there should be a better way to retrieve the account id, which is 'leaked in the exception anyway
# eventually; see http://stackoverflow.com/questions/10197784 for a respective question.
if not self.user:
from userinfo import UserInfo
Expand Down
2 changes: 1 addition & 1 deletion botocross/iam/userinfo.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def __init__(self, iam_connection):
# populate those attributes not leaked via the exception, if user has no permission for iam:GetUser
self.path = botocross.iam.RESOURCE_UNAUTHORIZED
self.create_date = botocross.iam.RESOURCE_UNAUTHORIZED
self.id = botocross.iam.RESOURCE_UNAUTHORIZED # TODO: could be deduced from credentials in use instead.
self.id = botocross.iam.RESOURCE_UNAUTHORIZED # REVIEW: could be deduced from credentials in use instead.
self.arn = None
self.name = None

Expand Down

0 comments on commit d75f912

Please sign in to comment.