From 5c7e5444d84126f187b983c250817cd993fc5423 Mon Sep 17 00:00:00 2001 From: Tony Mack Date: Mon, 10 Sep 2012 15:54:45 -0400 Subject: [PATCH] fix bug --- sfa/util/xrn.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) 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: -- 2.47.0