From 0a3159ac826bb3d94efeef7032150819823ae3e7 Mon Sep 17 00:00:00 2001 From: Marc Fiuczynski Date: Thu, 21 May 2009 01:49:47 +0000 Subject: [PATCH] auth fix --- PLC/Auth.py | 1 + PLC/Legacy/v42legacy.py | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/PLC/Auth.py b/PLC/Auth.py index f056552b..87936934 100644 --- a/PLC/Auth.py +++ b/PLC/Auth.py @@ -36,6 +36,7 @@ def map_auth(auth): expected = AnonymousAuth() else: raise PLCInvalidArgument("must be 'session', 'password', 'gpg', 'hmac', 'hmac_dummybox', or 'anonymous'", "AuthMethod") + return expected class Auth(Parameter): """ diff --git a/PLC/Legacy/v42legacy.py b/PLC/Legacy/v42legacy.py index 5e6cdae8..2e170fc0 100644 --- a/PLC/Legacy/v42legacy.py +++ b/PLC/Legacy/v42legacy.py @@ -30,11 +30,13 @@ def make_class (legacyname,newname,path,import_deep,v42rename,v43rename): #print "%s: self.caller = %s, auth=%s, self.api=%s, self=%s" % (legacyname,self.caller,auth,self.api,self) if not hasattr(self,"auth"): self.auth = None + if self.auth == None and auth <> None: self.auth = auth - if self.auth <> None: + if self.auth <> None and self.caller == None: a = PLC.Auth.map_auth(auth) + print "a = %s" % a a.check(self,auth,*args) newargs=[patch(x,v42rename) for x in args] -- 2.47.0