X-Git-Url: http://git.onelab.eu/?p=sfa.git;a=blobdiff_plain;f=sfa%2Futil%2Fxrn.py;h=08a257daad5290c0412dd787e1c0a7c28b5b631a;hp=e3871b5fb5decc20fc48b6cf90de6f994ec6bb84;hb=b6dcfc034473c011988fba0d02bbeb6406925465;hpb=5e20bae7c2007ed9349be7af53f1b6e342de1da7 diff --git a/sfa/util/xrn.py b/sfa/util/xrn.py index e3871b5f..08a257da 100644 --- a/sfa/util/xrn.py +++ b/sfa/util/xrn.py @@ -227,14 +227,15 @@ class Xrn: if self.type and self.type.startswith('authority'): self.authority = Xrn.hrn_auth_list(self.hrn) leaf = self.get_leaf() - if not self.authority: - self.authority = [self.hrn] + #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] - authority_string = ":".join([self.get_authority_urn(), leaf]) + 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)