mirror of
https://github.com/Hopiu/linkchecker.git
synced 2026-05-05 13:14:46 +00:00
catch value error on codec lookup
git-svn-id: https://linkchecker.svn.sourceforge.net/svnroot/linkchecker/trunk/linkchecker@3013 e7d03fd6-7b0d-0410-9947-9c21f3af8025
This commit is contained in:
parent
a3ef5f88c4
commit
e94c61529b
2 changed files with 2 additions and 2 deletions
|
|
@ -294,7 +294,7 @@ def get_ctype_charset (text):
|
|||
try:
|
||||
codecs.lookup(charset)
|
||||
return charset
|
||||
except LookupError:
|
||||
except (LookupError, ValueError):
|
||||
pass
|
||||
return None
|
||||
|
||||
|
|
|
|||
|
|
@ -78,7 +78,7 @@ def is_encoding (text):
|
|||
"""
|
||||
try:
|
||||
return codecs.lookup(text)
|
||||
except LookupError:
|
||||
except (LookupError, ValueError):
|
||||
return False
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue