From 24b6cb89d443384cb432f01265c45bc18d9cf2fc Mon Sep 17 00:00:00 2001 From: Jason Gerard DeRose Date: Thu, 22 Jan 2009 15:41:54 -0700 Subject: Further migration toward new xmlrcp code; fixed problem with unicode Fault.faultString; fixed problem where ServerProxy method was not called correctly --- ipalib/cli.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'ipalib/cli.py') diff --git a/ipalib/cli.py b/ipalib/cli.py index 809c0e55..62b8b930 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): """ -- cgit