diff options
author | Petr Klíma <qaxi@seznam.cz> | 2016-03-15 11:08:38 +0100 |
---|---|---|
committer | Petr Klíma <qaxi@seznam.cz> | 2016-03-15 11:08:38 +0100 |
commit | c0bc90d12232f5bee2ce8978c5dd44ee830c0c47 (patch) | |
tree | daa465a0e46d3aabfe3ae10dfda41c2b57552c29 | |
parent | 075ce980a24d1e31ad704915681ef3f7edd03ccb (diff) | |
download | servo-c0bc90d12232f5bee2ce8978c5dd44ee830c0c47.tar.gz servo-c0bc90d12232f5bee2ce8978c5dd44ee830c0c47.zip |
Handle exception with errormessage on topdir with Unicode characters.
https://github.com/servo/servo/issues/10002
-rw-r--r-- | python/mach_bootstrap.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/python/mach_bootstrap.py b/python/mach_bootstrap.py index 2ec070826da..05b21c4fdfa 100644 --- a/python/mach_bootstrap.py +++ b/python/mach_bootstrap.py @@ -149,6 +149,15 @@ def _activate_virtualenv(topdir): def bootstrap(topdir): topdir = os.path.abspath(topdir) + # We don't support paths with Unicode characters for now + # https://github.com/servo/servo/issues/10002 + try: + topdir.decode('ascii') + except UnicodeDecodeError: + print('Cannot run mach in a path with Unicode characters.') + print('Current path:', topdir) + sys.exit(1) + # We don't support paths with spaces for now # https://github.com/servo/servo/issues/9442 if ' ' in topdir: |