rename variable
authorTony Mack <tmack@cs.princeton.edu>
Fri, 6 Aug 2010 21:39:54 +0000 (21:39 +0000)
committerTony Mack <tmack@cs.princeton.edu>
Fri, 6 Aug 2010 21:39:54 +0000 (21:39 +0000)
sfa/trust/auth.py

index 3037051..f8d09b4 100644 (file)
@@ -87,9 +87,10 @@ class Auth:
         # This check does not apply to trusted peers 
         trusted_peers = [gid.get_hrn() for gid in self.trusted_cert_list]
         if hrn and self.client_gid.get_hrn() not in trusted_peers:
-            if not hrn == self.object_gid.get_hrn():
+            target_hrn = self.object_gid.get_hrn()
+            if not hrn == target_hrn:
                 raise PermissionError("Target hrn: %s doesn't match specified hrn: %s " % \
-                                       (self.object_gid.get_hrn(), hrn) )       
+                                       (target_hrn, hrn) )       
         return True
 
     def check_ticket(self, ticket):