DebugClients/Python/coverage/files.py

changeset 4385
599681bf149a
parent 3499
f2d4b02c7e88
child 4489
d0d6e4ad31bd
--- a/DebugClients/Python/coverage/files.py	Sun Aug 23 11:31:11 2015 +0200
+++ b/DebugClients/Python/coverage/files.py	Sun Aug 23 11:37:17 2015 +0200
@@ -11,6 +11,8 @@
     def __init__(self):
         # The absolute path to our current directory.
         self.relative_dir = os.path.normcase(abs_file(os.curdir) + os.sep)
+        if isinstance(self.relative_dir, str):
+            self.relative_dir = self.relative_dir.decode(sys.getfilesystemencoding())
 
         # Cache of results of calling the canonical_filename() method, to
         # avoid duplicating work.
@@ -23,6 +25,8 @@
         `FileLocator` was constructed.
 
         """
+        if isinstance(filename, str):
+            filename = filename.decode(sys.getfilesystemencoding())
         fnorm = os.path.normcase(filename)
         if fnorm.startswith(self.relative_dir):
             filename = filename[len(self.relative_dir):]

eric ide

mercurial