From: Tony Mack Date: Tue, 12 Jan 2010 22:24:37 +0000 (+0000) Subject: urn from hrn if urn doesnt exist X-Git-Tag: sfa-0.9-9~18 X-Git-Url: http://git.onelab.eu/?p=sfa.git;a=commitdiff_plain;h=be43440344641334c2d404857c85f3ae341db3d6 urn from hrn if urn doesnt exist --- diff --git a/sfa/trust/gid.py b/sfa/trust/gid.py index cde44769..7e9d40ce 100644 --- a/sfa/trust/gid.py +++ b/sfa/trust/gid.py @@ -97,6 +97,11 @@ class GID(Certificate): # certificate. It may only be called once per certificate. def encode(self): + if self.urn: + urn = self.urn + else: + urn = hrn_to_urn(self.hrn, None) + dict = {"uuid": self.uuid, "urn": self.urn} str = xmlrpclib.dumps((dict,))