checkCreds accepts 1 or more credentials
authorTony Mack <tmack@cs.princeton.edu>
Mon, 2 Aug 2010 21:25:54 +0000 (21:25 +0000)
committerTony Mack <tmack@cs.princeton.edu>
Mon, 2 Aug 2010 21:25:54 +0000 (21:25 +0000)
sfa/trust/auth.py

index 470dc5e..3037051 100644 (file)
@@ -37,6 +37,8 @@ class Auth:
         
     def checkCredentials(self, creds, operation, hrn = None):
         valid = []
+        if not isinstance(creds, list):
+            creds = [creds]
         for cred in creds:
             try:
                 self.check(cred, operation, hrn)