diff options
author | Takayuki Shimizukawa <shimizukawa@gmail.com> | 2013-09-28 12:51:20 +0000 |
---|---|---|
committer | Takayuki Shimizukawa <shimizukawa@gmail.com> | 2013-09-28 12:51:20 +0000 |
commit | 58be2f19b3aeeabf4d9a3d10be84824508c0fda2 (patch) | |
tree | a8a7655fd475a3d77ecdc8ff3919c421af9e3b99 /sphinx/cmdline.py | |
parent | 445bb5daecba49e8054435d8071130e1fb48383e (diff) | |
download | sphinx-git-58be2f19b3aeeabf4d9a3d10be84824508c0fda2.tar.gz |
When Sphinx couldn't decode multibyte filename, now Sphinx notices UnicodeError and continuing if possible instead of raise exception. Closes #703
Diffstat (limited to 'sphinx/cmdline.py')
-rw-r--r-- | sphinx/cmdline.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/sphinx/cmdline.py b/sphinx/cmdline.py index 43c33378c..a9dc9fc85 100644 --- a/sphinx/cmdline.py +++ b/sphinx/cmdline.py @@ -22,7 +22,7 @@ from sphinx.errors import SphinxError from sphinx.application import Sphinx from sphinx.util import Tee, format_exception_cut_frames, save_traceback from sphinx.util.console import red, nocolor, color_terminal -from sphinx.util.osutil import abspath +from sphinx.util.osutil import abspath, fs_encoding from sphinx.util.pycompat import terminal_safe, bytes @@ -112,6 +112,11 @@ def main(argv): except IndexError: usage(argv, 'Error: Insufficient arguments.') return 1 + except UnicodeError: + print >>sys.stderr, ( + 'Error: Multibyte filename did not support on this filesystem ' + 'encoding: %s' % fs_encoding) + return 1 filenames = args[2:] err = 0 |