X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=sfa%2Futil%2Fxrn.py;h=08a257daad5290c0412dd787e1c0a7c28b5b631a;hb=b6dcfc034473c011988fba0d02bbeb6406925465;hp=19b1fc18a0f0607ab4dadf4bda36228a11d6b896;hpb=1db1a879ffde8991aa95dd80142d555551655e88;p=sfa.git diff --git a/sfa/util/xrn.py b/sfa/util/xrn.py index 19b1fc18..08a257da 100644 --- a/sfa/util/xrn.py +++ b/sfa/util/xrn.py @@ -225,17 +225,21 @@ class Xrn: raise SfaAPIError, "Xrn.hrn_to_urn, hrn=%s"%self.hrn if self.type and self.type.startswith('authority'): - self.authority = Xrn.hrn_split(self.hrn) + self.authority = Xrn.hrn_auth_list(self.hrn) + leaf = self.get_leaf() + #if not self.authority: + # self.authority = [self.hrn] type_parts = self.type.split("+") self.type = type_parts[0] name = 'sa' if len(type_parts) > 1: name = type_parts[1] + auth_parts = [part for part in [self.get_authority_urn(), leaf] if part] + authority_string = ":".join(auth_parts) else: self.authority = Xrn.hrn_auth_list(self.hrn) name = Xrn.hrn_leaf(self.hrn) - - authority_string = self.get_authority_urn() + authority_string = self.get_authority_urn() if self.type == None: urn = "+".join(['',authority_string,Xrn.unescape(name)])