diff options
author | Rob Crittenden <rcritten@redhat.com> | 2008-11-03 17:38:05 -0500 |
---|---|---|
committer | Rob Crittenden <rcritten@redhat.com> | 2008-11-03 17:38:05 -0500 |
commit | f1314806434b9226f8a7722675b060bdf574c455 (patch) | |
tree | 5de794202b5c7cecd25de3848418b1740d825897 | |
parent | a97f5d76d1f9caa9dee30b67dc6b68d436a334c2 (diff) | |
download | freeipa-f1314806434b9226f8a7722675b060bdf574c455.tar.gz freeipa-f1314806434b9226f8a7722675b060bdf574c455.tar.xz freeipa-f1314806434b9226f8a7722675b060bdf574c455.zip |
Move socket errors from the XML-RPC plugin to the client
-rw-r--r-- | ipalib/cli.py | 4 | ||||
-rw-r--r-- | ipalib/plugins/b_xmlrpc.py | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/ipalib/cli.py b/ipalib/cli.py index 8cf8d3043..d72881547 100644 --- a/ipalib/cli.py +++ b/ipalib/cli.py @@ -25,6 +25,7 @@ import re import sys import code import optparse +import socket import frontend import errors @@ -377,6 +378,9 @@ class CLI(object): if callable(cmd.output_for_cli): cmd.output_for_cli(ret) return 0 + except socket.error, e: + print e[1] + return 1 except errors.GenericError, err: code = getattr(err,'faultCode',None) faultString = getattr(err,'faultString',None) diff --git a/ipalib/plugins/b_xmlrpc.py b/ipalib/plugins/b_xmlrpc.py index 9c6af0a03..87dc95050 100644 --- a/ipalib/plugins/b_xmlrpc.py +++ b/ipalib/plugins/b_xmlrpc.py @@ -61,7 +61,7 @@ class xmlrpc(Backend): try: return command(*params) except socket.error, e: - print e[1] + raise except xmlrpclib.Fault, e: err = errors.convertFault(e) raise err |