Commit 6a1571aa authored by Guido van Rossum's avatar Guido van Rossum

Fix bogosities in error reporting.

Add -S to usage message.
parent 013116ab
...@@ -14,6 +14,8 @@ Options: ...@@ -14,6 +14,8 @@ Options:
-p port -- port to connect to -p port -- port to connect to
-h host -- host to connect to (default is current host) -h host -- host to connect to (default is current host)
-S storage -- storage name (default '1')
-U path -- Unix-domain socket to connect to -U path -- Unix-domain socket to connect to
...@@ -95,7 +97,10 @@ def main(): ...@@ -95,7 +97,10 @@ def main():
elif o == '-1': elif o == '-1':
ZEO_VERSION = 1 ZEO_VERSION = 1
except Exception, err: except Exception, err:
print err s = str(err)
if s:
s = ": " + s
print err.__class__.__name__ + s
usage() usage()
if unix is not None: if unix is not None:
...@@ -112,6 +117,11 @@ def main(): ...@@ -112,6 +117,11 @@ def main():
if __name__ == "__main__": if __name__ == "__main__":
try: try:
main() main()
except SystemExit:
raise
except Exception, err: except Exception, err:
print err s = str(err)
if s:
s = ": " + s
print err.__class__.__name__ + s
sys.exit(1) sys.exit(1)
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment