aboutsummaryrefslogtreecommitdiff
path: root/clint.py
diff options
context:
space:
mode:
authorMichael Reed <m.reed@mykolab.com>2015-06-25 23:48:12 -0400
committerMichael Reed <m.reed@mykolab.com>2015-06-27 15:21:09 -0400
commited6611a588e2f21be60db11dc75f69e40500ea1f (patch)
treecef83fc2a90b108e8e688a116a7951970ce45dc6 /clint.py
parent0cfadce547d78c72cc6214cbe647993721b0eba8 (diff)
downloadrneovim-ed6611a588e2f21be60db11dc75f69e40500ea1f.tar.gz
rneovim-ed6611a588e2f21be60db11dc75f69e40500ea1f.tar.bz2
rneovim-ed6611a588e2f21be60db11dc75f69e40500ea1f.zip
clint.py: don't print `--help` output to stderr and exit 1
a) It's not an error b) It requires manual redirection of stderr into stdout ('2>&1') in order to be viewed with a pager, which it warrants given how long the help message is. Helped-by: Florian Walch <florian@fwalch.com>
Diffstat (limited to 'clint.py')
-rwxr-xr-xclint.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/clint.py b/clint.py
index ccf1c11c3d..9715edd54e 100755
--- a/clint.py
+++ b/clint.py
@@ -3079,11 +3079,12 @@ def PrintUsage(message):
Args:
message: The optional error message.
"""
- sys.stderr.write(_USAGE)
if message:
+ sys.stderr.write(_USAGE)
sys.exit('\nFATAL ERROR: ' + message)
else:
- sys.exit(1)
+ sys.stdout.write(_USAGE)
+ sys.exit(0)
def PrintCategories():
@@ -3091,7 +3092,7 @@ def PrintCategories():
These are the categories used to filter messages via --filter.
"""
- sys.stderr.write(''.join(' %s\n' % cat for cat in _ERROR_CATEGORIES))
+ sys.stdout.write(''.join(' %s\n' % cat for cat in _ERROR_CATEGORIES))
sys.exit(0)