older gids will still have the hrn encoded in the gid, so when decodeing first check...
authorTony Mack <tmack@cs.princeton.edu>
Tue, 12 Jan 2010 20:46:11 +0000 (20:46 +0000)
committerTony Mack <tmack@cs.princeton.edu>
Tue, 12 Jan 2010 20:46:11 +0000 (20:46 +0000)
sfa/trust/gid.py

index 2350af1..cde4476 100644 (file)
@@ -116,7 +116,9 @@ class GID(Certificate):
 
         self.uuid = dict.get("uuid", None)
         self.urn = dict.get("urn", None)
-        self.hrn = urn_to_hrn(self.urn)[0]
+        self.hrn = dict.get("hrn", None)    
+        if self.urn:
+            self.hrn = urn_to_hrn(self.urn)[0]
 
     ##
     # Dump the credential to stdout.