Extended exception handling to be a bit more verbose about unicode bugs.
This commit is contained in:
@@ -85,6 +85,11 @@ class Compressor(object):
|
|||||||
except IOError, e:
|
except IOError, e:
|
||||||
raise UncompressableFileError("IOError while processing "
|
raise UncompressableFileError("IOError while processing "
|
||||||
"'%s': %s" % (filename, e))
|
"'%s': %s" % (filename, e))
|
||||||
|
except UnicodeDecodeError, e:
|
||||||
|
raise UncompressableFileError("UnicodeDecodeError while "
|
||||||
|
"processing '%s' with "
|
||||||
|
"charset %s: %s" %
|
||||||
|
(filename, charset, e))
|
||||||
|
|
||||||
@cached_property
|
@cached_property
|
||||||
def parser(self):
|
def parser(self):
|
||||||
|
|||||||
Reference in New Issue
Block a user