[i18n] fix pb with non-ascii chars in cwd. closes #2149063 stable
authorFlorent Cayré <florent.cayre@gmail.com>
Mon, 13 Feb 2012 12:45:21 +0100
branchstable
changeset 8225 baf8c16cae95
parent 8224 e35d4d4f7eb3
child 8226 a3d3bdd46463
[i18n] fix pb with non-ascii chars in cwd. closes #2149063
i18n.py
--- a/i18n.py	Mon Feb 13 12:41:04 2012 +0100
+++ b/i18n.py	Mon Feb 13 12:45:21 2012 +0100
@@ -60,7 +60,9 @@
     status != 0
     """
     from subprocess import call
-    print cmd.replace(os.getcwd() + os.sep, '')
+    # use getcwdu as cmd may be unicode and cwd may contains non-ascii
+    # characters
+    print cmd.replace(os.getcwdu() + os.sep, '')
     status = call(cmd, shell=True)
     if status != 0:
         raise Exception('status = %s' % status)