Skip to content

Commit

Permalink
pep8 fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
jjjake committed May 13, 2016
1 parent 3d7e3c9 commit cf63e6c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion internetarchive/cli/ia_download.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ def main(argv, session):
for i, identifier in enumerate(ids):
try:
identifier = identifier.strip()
except AttributeError:
except AttributeError:
identifier = identifier.get('identifier')
if total_ids > 1:
item_index = '{0}/{1}'.format((i + 1), total_ids)
Expand Down
3 changes: 2 additions & 1 deletion internetarchive/item.py
Original file line number Diff line number Diff line change
Expand Up @@ -485,7 +485,8 @@ def upload_file(self, body,
# Build IA-S3 URL.
key = body.name.split('/')[-1] if key is None else key
base_url = '{0.session.protocol}//s3.us.archive.org/{0.identifier}'.format(self)
url = '{0}/{1}'.format(base_url, urllib.parse.quote(key.lstrip('/').encode('utf-8')))
url = '{0}/{1}'.format(
base_url, urllib.parse.quote(key.lstrip('/').encode('utf-8')))

# Skip based on checksum.
if checksum:
Expand Down
1 change: 1 addition & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ pep8ignore =
docs/source/conf.py ALL
ia_upload.py E128
tests/* E402
internetarchive/cli/ia_download.py E501
pep8maxlinelength = 90
flakes-ignore =
docs/source/conf.py UnusedImport

0 comments on commit cf63e6c

Please sign in to comment.