Commit 747c7b9b by willmcgugan@gmail.com

py2.6 fixes

parent 41efb9b7
...@@ -754,7 +754,7 @@ class FS(object): ...@@ -754,7 +754,7 @@ class FS(object):
""" """
info = self.getinfo(path) info = self.getinfo(path)
return {k: info[k] for k in keys if k in info} return dict((k, info[k]) for k in keys if k in info)
def desc(self, path): def desc(self, path):
"""Returns short descriptive text regarding a path. Intended mainly as """Returns short descriptive text regarding a path. Intended mainly as
......
...@@ -67,7 +67,7 @@ class FSError(Exception): ...@@ -67,7 +67,7 @@ class FSError(Exception):
keys = {} keys = {}
for k,v in self.__dict__.iteritems(): for k,v in self.__dict__.iteritems():
if isinstance(v, six.binary_type): if isinstance(v, six.binary_type):
v = v.decode(sys.getfilesystemencoding(), errors='replace') v = v.decode(sys.getfilesystemencoding(), 'replace')
keys[k] = v keys[k] = v
return unicode(self.msg, encoding=sys.getfilesystemencoding(), errors='replace') % keys return unicode(self.msg, encoding=sys.getfilesystemencoding(), errors='replace') % keys
......
[tox] [tox]
envlist = py26,py27,py31,py32,pypy envlist = py26,py27,py31,py32,py33,pypy
sitepackages = False sitepackages = False
[testenv] [testenv]
......
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