summaryrefslogtreecommitdiffstats
path: root/ipalib/cli.py
diff options
context:
space:
mode:
Diffstat (limited to 'ipalib/cli.py')
-rw-r--r--ipalib/cli.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/ipalib/cli.py b/ipalib/cli.py
index 8cf8d304..d7288154 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)