Commit 4e5b9814 by rfkelly0

better error printing if they contain unicode paths

parent 939c451f
......@@ -31,11 +31,11 @@ class FSError(Exception):
self.details = details
def __str__(self):
keys = dict((k,str(v)) for k,v in self.__dict__.iteritems())
return self.msg % keys
return unicode(self).encode(sys.getfilesystemencoding())
def __unicode__(self):
return unicode(str(self))
keys = dict((k,v) for k,v in self.__dict__.iteritems())
return unicode(self.msg) % keys
def __getstate__(self):
return self.__dict__.copy()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment