From: Tony Mack Date: Tue, 12 Jan 2010 20:46:11 +0000 (+0000) Subject: older gids will still have the hrn encoded in the gid, so when decodeing first check... X-Git-Tag: sfa-0.9-9~20 X-Git-Url: http://git.onelab.eu/?p=sfa.git;a=commitdiff_plain;h=a2d1a28d539d02ef393c102765e2d561c29d2edd older gids will still have the hrn encoded in the gid, so when decodeing first check if the hrn is encoded in the gid. Over write this with the hrn translated from urn if urn exists --- diff --git a/sfa/trust/gid.py b/sfa/trust/gid.py index 2350af19..cde44769 100644 --- a/sfa/trust/gid.py +++ b/sfa/trust/gid.py @@ -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.