Skip to content

Commit

Permalink
string: Handle ValueError codec error on Py 3.5
Browse files Browse the repository at this point in the history
  • Loading branch information
chfoo committed Oct 21, 2015
1 parent e7d8f96 commit ccef9ec
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions wpull/string.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ def normalize_codec_name(name):

try:
return codecs.lookup(name).name
except (LookupError, TypeError):
# TypeError occurs when name contains \x00
except (LookupError, TypeError, ValueError):
# TypeError occurs when name contains \x00 (ValueError in Py3.5)
pass


Expand Down

0 comments on commit ccef9ec

Please sign in to comment.