[meld/Python3: 28/54] vc.git: Fix string-escape for 'exciting' py3k behaviour



commit 39ecd9bf906a4a68178f893a2a0618e475081675
Author: Kai Willadsen <kai willadsen gmail com>
Date:   Sun Nov 15 08:29:32 2015 +1000

    vc.git: Fix string-escape for 'exciting' py3k behaviour

 meld/vc/git.py |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/meld/vc/git.py b/meld/vc/git.py
index db0030e..bc06ddf 100644
--- a/meld/vc/git.py
+++ b/meld/vc/git.py
@@ -299,7 +299,8 @@ class Vc(_vc.Vc):
             # Unicode file names and file names containing quotes are
             # returned by git as quoted strings
             if name[0] == '"':
-                name = name[1:-1].decode('string_escape')
+                name = name.encode('utf-8')
+                name = name[1:-1].decode('unicode_escape')
             return os.path.abspath(
                 os.path.join(self.location, name))
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]