summaryrefslogtreecommitdiffstats
path: root/ipalib/cli.py
diff options
context:
space:
mode:
authorJason Gerard DeRose <jderose@redhat.com>2009-01-22 15:41:54 -0700
committerRob Crittenden <rcritten@redhat.com>2009-02-03 15:29:01 -0500
commit24b6cb89d443384cb432f01265c45bc18d9cf2fc (patch)
tree50aa6e4b2ce4863d018644026c34085347263c74 /ipalib/cli.py
parent9f48612a56b6e760aa06a9af2071f1b50f413f27 (diff)
downloadfreeipa-24b6cb89d443384cb432f01265c45bc18d9cf2fc.tar.gz
freeipa-24b6cb89d443384cb432f01265c45bc18d9cf2fc.tar.xz
freeipa-24b6cb89d443384cb432f01265c45bc18d9cf2fc.zip
Further migration toward new xmlrcp code; fixed problem with unicode Fault.faultString; fixed problem where ServerProxy method was not called correctly
Diffstat (limited to 'ipalib/cli.py')
-rw-r--r--ipalib/cli.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/ipalib/cli.py b/ipalib/cli.py
index 809c0e551..62b8b9304 100644
--- a/ipalib/cli.py
+++ b/ipalib/cli.py
@@ -35,6 +35,7 @@ import struct
import frontend
import backend
import errors
+import errors2
import plugable
import util
from constants import CLI_TAB
@@ -534,9 +535,9 @@ class CLI(object):
print ''
self.api.log.info('operation aborted')
sys.exit()
- except errors.IPAError, e:
- self.api.log.error(unicode(e))
- sys.exit(e.faultCode)
+ except errors2.PublicError, e:
+ self.api.log.error(e.strerror)
+ sys.exit(e.errno)
def run_real(self):
"""
@@ -620,6 +621,8 @@ class CLI(object):
(c.name.replace('_', '-'), c) for c in self.api.Command()
)
self.textui = self.api.Backend.textui
+ if self.api.env.in_server is False and 'xmlclient' in self.api.Backend:
+ self.api.Backend.xmlclient.connect()
def load_plugins(self):
"""