Skip to content

Commit

Permalink
better formatting of getclient
Browse files Browse the repository at this point in the history
  • Loading branch information
Robert Gardam committed Oct 29, 2015
1 parent f153d44 commit 4d61788
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions bin/rpm-s3
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,15 @@ class FileGrabber(object):

def getclient(base, region):
if os.getenv('AWS_ACCESS_KEY'):
return boto.connect_s3(os.getenv('AWS_ACCESS_KEY'), os.getenv('AWS_SECRET_KEY'), host="s3-{}.amazonaws.com".format(region)).get_bucket(base.netloc)
return boto.connect_s3(
os.getenv('AWS_ACCESS_KEY'),
os.getenv('AWS_SECRET_KEY'),
host="s3-{}.amazonaws.com".format(region)
).get_bucket(base.netloc)
else:
return boto.connect_s3(host="s3-{}.amazonaws.com".format(region)).get_bucket(base.netloc)
return boto.connect_s3(
host="s3-{}.amazonaws.com".format(region)
).get_bucket(base.netloc)


def sign(rpmfile):
Expand Down

0 comments on commit 4d61788

Please sign in to comment.