##// END OF EJS Templates
unicode sadness on Windows in the submodule check
MinRK -
Show More
@@ -67,6 +67,10 b' def check_submodule_status(root=None):'
67 67 if not os.path.exists(submodule):
68 68 return 'missing'
69 69
70 # Popen can't handle unicode cwd on Windows Python 2
71 if sys.platform == 'win32' and sys.version_info[0] < 3 \
72 and not isinstance(root, bytes):
73 root = root.encode(sys.getfilesystemencoding() or 'ascii')
70 74 # check with git submodule status
71 75 proc = subprocess.Popen('git submodule status',
72 76 stdout=subprocess.PIPE,
@@ -75,7 +79,7 b' def check_submodule_status(root=None):'
75 79 cwd=root,
76 80 )
77 81 status, _ = proc.communicate()
78 status = status.decode("ascii")
82 status = status.decode("ascii", "replace")
79 83
80 84 for line in status.splitlines():
81 85 if status.startswith('-'):
General Comments 0
You need to be logged in to leave comments. Login now