Show More
@@ -66,7 +66,11 b' def check_submodule_status(root=None):' | |||||
66 | for submodule in submodules: |
|
66 | for submodule in submodules: | |
67 | if not os.path.exists(submodule): |
|
67 | if not os.path.exists(submodule): | |
68 | return 'missing' |
|
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 | # check with git submodule status |
|
74 | # check with git submodule status | |
71 | proc = subprocess.Popen('git submodule status', |
|
75 | proc = subprocess.Popen('git submodule status', | |
72 | stdout=subprocess.PIPE, |
|
76 | stdout=subprocess.PIPE, | |
@@ -75,7 +79,7 b' def check_submodule_status(root=None):' | |||||
75 | cwd=root, |
|
79 | cwd=root, | |
76 | ) |
|
80 | ) | |
77 | status, _ = proc.communicate() |
|
81 | status, _ = proc.communicate() | |
78 | status = status.decode("ascii") |
|
82 | status = status.decode("ascii", "replace") | |
79 |
|
83 | |||
80 | for line in status.splitlines(): |
|
84 | for line in status.splitlines(): | |
81 | if status.startswith('-'): |
|
85 | if status.startswith('-'): |
General Comments 0
You need to be logged in to leave comments.
Login now