X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=sfa%2Fplanetlab%2Fplshell.py;h=15c58b69cd0647723e33de51e3785205ac8ae14e;hb=ecc85e0b923922cf7117d29b380f5284edb88f21;hp=5162fe8447e99ff96679b9cea74f0b01f072ad39;hpb=a6d9810733f7d21fd43ba519dae5ccfcdc138095;p=sfa.git diff --git a/sfa/planetlab/plshell.py b/sfa/planetlab/plshell.py index 5162fe84..15c58b69 100644 --- a/sfa/planetlab/plshell.py +++ b/sfa/planetlab/plshell.py @@ -70,16 +70,16 @@ class PlShell: if is_local and plc_direct_access: logger.info('plshell access - capability') self.plauth = { 'AuthMethod': 'capability', - 'Username': config.SFA_PLC_USER, - 'AuthString': config.SFA_PLC_PASSWORD, + 'Username': str(config.SFA_PLC_USER), + 'AuthString': str(config.SFA_PLC_PASSWORD), } self.proxy = PLC.Shell.Shell () else: logger.info('plshell access - xmlrpc') self.plauth = { 'AuthMethod': 'password', - 'Username': config.SFA_PLC_USER, - 'AuthString': config.SFA_PLC_PASSWORD, + 'Username': str(config.SFA_PLC_USER), + 'AuthString': str(config.SFA_PLC_PASSWORD), } self.proxy = xmlrpclib.Server(url, verbose = False, allow_none = True) @@ -89,9 +89,8 @@ class PlShell: if name in PlShell.direct_calls: actual_name=name if name in PlShell.alias_calls: actual_name=PlShell.alias_calls[name] if not actual_name: - raise Exception, "Illegal method call %s for PL driver"%(name) + raise Exception("Illegal method call %s for PL driver"%(name)) result=getattr(self.proxy, actual_name)(self.plauth, *args, **kwds) logger.debug('PlShell %s (%s) returned ... '%(name,actual_name)) return result return func -