diff options
Diffstat (limited to 'sphinx/cmdline.py')
-rw-r--r-- | sphinx/cmdline.py | 28 |
1 files changed, 16 insertions, 12 deletions
diff --git a/sphinx/cmdline.py b/sphinx/cmdline.py index 20767f0d4..5b57a7c39 100644 --- a/sphinx/cmdline.py +++ b/sphinx/cmdline.py @@ -31,7 +31,8 @@ def usage(argv, msg=None): Sphinx v%s Usage: %s [options] sourcedir outdir [filenames...] Options: -b <builder> -- builder to use; default is html - -a -- write all files; default is to only write new and changed files + -a -- write all files; default is to only write \ +new and changed files -E -- don't use a saved environment, always read all files -d <path> -- path for the cached environment and doctree files (default: outdir/.doctrees) @@ -64,7 +65,8 @@ def main(argv): return 1 if not path.isfile(path.join(srcdir, 'conf.py')) and \ '-c' not in allopts and '-C' not in allopts: - print >>sys.stderr, 'Error: Source directory doesn\'t contain conf.py file.' + print >>sys.stderr, ('Error: Source directory doesn\'t ' + 'contain conf.py file.') return 1 outdir = path.abspath(args[1]) if not path.isdir(outdir): @@ -103,8 +105,8 @@ def main(argv): elif opt == '-c': confdir = path.abspath(val) if not path.isfile(path.join(confdir, 'conf.py')): - print >>sys.stderr, \ - 'Error: Configuration directory doesn\'t contain conf.py file.' + print >>sys.stderr, ('Error: Configuration directory ' + 'doesn\'t contain conf.py file.') return 1 elif opt == '-C': confdir = None @@ -112,8 +114,8 @@ def main(argv): try: key, val = val.split('=') except ValueError: - print >>sys.stderr, \ - 'Error: -D option argument must be in the form name=value.' + print >>sys.stderr, ('Error: -D option argument must be ' + 'in the form name=value.') return 1 try: val = int(val) @@ -124,8 +126,8 @@ def main(argv): try: key, val = val.split('=') except ValueError: - print >>sys.stderr, \ - 'Error: -A option argument must be in the form name=value.' + print >>sys.stderr, ('Error: -A option argument must be ' + 'in the form name=value.') return 1 try: val = int(val) @@ -153,7 +155,8 @@ def main(argv): except KeyboardInterrupt: if use_pdb: import pdb - print >>sys.stderr, darkred('Interrupted while building, starting debugger:') + print >>sys.stderr, darkred('Interrupted while building, ' + 'starting debugger:') traceback.print_exc() pdb.post_mortem(sys.exc_info()[2]) return 1 @@ -167,7 +170,8 @@ def main(argv): else: if isinstance(err, SystemMessage): print >>sys.stderr, darkred('reST markup error:') - print >>sys.stderr, err.args[0].encode('ascii', 'backslashreplace') + print >>sys.stderr, err.args[0].encode('ascii', + 'backslashreplace') elif isinstance(err, SphinxError): print >>sys.stderr, darkred('%s:' % err.category) print >>sys.stderr, err @@ -181,6 +185,6 @@ def main(argv): print >>sys.stderr, ('Please also report this if it was a user ' 'error, so that a better error message ' 'can be provided next time.') - print >>sys.stderr, ('Send reports to sphinx-dev@googlegroups.com. ' - 'Thanks!') + print >>sys.stderr, ('Send reports to ' + 'sphinx-dev@googlegroups.com. Thanks!') return 1 |