X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=sfa%2Futil%2Fxrn.py;h=764bd41872f089b894f088b218ca49f12ac37f2d;hb=5c7e5444d84126f187b983c250817cd993fc5423;hp=493cbba8f14cd371d8cc40a9c4002488857820ae;hpb=8f2102fc4f7ecf269bdf62480a63b9b044544098;p=sfa.git 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: