From: Tony Mack Date: Fri, 7 Sep 2012 16:02:55 +0000 (-0400) Subject: update a urn's type in Xrn.__init__() X-Git-Tag: sfa-2.1-14~15 X-Git-Url: http://git.onelab.eu/?p=sfa.git;a=commitdiff_plain;h=e588513a6920926873b8566ce9b3e50eb4de95ba update a urn's type in Xrn.__init__() --- diff --git a/sfa/util/xrn.py b/sfa/util/xrn.py index 38656a70..9a5740c8 100644 --- a/sfa/util/xrn.py +++ b/sfa/util/xrn.py @@ -123,16 +123,18 @@ class Xrn: if Xrn.is_urn(xrn): self.hrn=None self.urn=xrn - if type: - self.type=type if id: self.urn = "%s-%s" % (self.urn, str(id)) self.urn_to_hrn() + if type: + self.type=type + self.hrn_to_urn() else: self.urn=None self.hrn=xrn self.type=type self.hrn_to_urn() + self._normalize() # happens all the time .. # if not type: