Skip to content

Commit

Permalink
Fix for newly discovered python 3 issue causing unprintable exceptions
Browse files Browse the repository at this point in the history
  • Loading branch information
awwad committed Mar 16, 2016
1 parent 1ee1f92 commit c4ef697
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tuf/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -332,13 +332,13 @@ def __init__(self, mirror_errors):
def __str__(self):
all_errors = 'No working mirror was found:'

for mirror_url, mirror_error in self.mirror_errors.iteritems():
for mirror_url, mirror_error in six.iteritems(self.mirror_errors):
try:
# http://docs.python.org/2/library/urlparse.html#urlparse.urlparse
mirror_url_tokens = six.moves.urllib.parse.urlparse(mirror_url)

except:
logging.exception('Failed to parse mirror URL: ' + repr(mirror_url))
#logging.exception('Failed to parse mirror URL: ' + repr(mirror_url))
mirror_netloc = mirror_url

else:
Expand Down

0 comments on commit c4ef697

Please sign in to comment.