From: Tony Mack Date: Mon, 10 Sep 2012 19:54:45 +0000 (-0400) Subject: fix bug X-Git-Tag: sfa-2.1-14~7 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=5c7e5444d84126f187b983c250817cd993fc5423;p=sfa.git fix bug --- diff --git a/sfa/util/xrn.py b/sfa/util/xrn.py index 493cbba8..764bd418 100644 --- a/sfa/util/xrn.py +++ b/sfa/util/xrn.py @@ -120,14 +120,13 @@ class Xrn: if not xrn: xrn = "" # user has specified xrn : guess if urn or hrn self.id = id + self.type = type + if Xrn.is_urn(xrn): self.hrn=None self.urn=xrn - if id: - self.urn = "%s-%s" % (self.urn, str(id)) self.urn_to_hrn() - if type: - self.type=type + if id: self.hrn_to_urn() else: self.urn=None @@ -245,8 +244,6 @@ class Xrn: self.authority = Xrn.hrn_auth_list(self.hrn) name = Xrn.hrn_leaf(self.hrn) # separate name from id - name_parts = name.split("-") - name = name_parts[0] authority_string = self.get_authority_urn() if self.type == None: