auth fix
authorMarc Fiuczynski <mef@cs.princeton.edu>
Thu, 21 May 2009 01:49:47 +0000 (01:49 +0000)
committerMarc Fiuczynski <mef@cs.princeton.edu>
Thu, 21 May 2009 01:49:47 +0000 (01:49 +0000)
PLC/Auth.py
PLC/Legacy/v42legacy.py

index f056552..8793693 100644 (file)
@@ -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):
     """
index 5e6cdae..2e170fc 100644 (file)
@@ -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]