X-Git-Url: http://git.onelab.eu/?p=sfa.git;a=blobdiff_plain;f=sfa%2Futil%2Fxrn.py;h=08a257daad5290c0412dd787e1c0a7c28b5b631a;hp=367d868e5a7168c216483339fc1747131dca2d89;hb=b6dcfc034473c011988fba0d02bbeb6406925465;hpb=999893377056972a8ac599135dee3f6cbe530f3f diff --git a/sfa/util/xrn.py b/sfa/util/xrn.py index 367d868e..08a257da 100644 --- a/sfa/util/xrn.py +++ b/sfa/util/xrn.py @@ -22,7 +22,7 @@ #---------------------------------------------------------------------- import re - +import sys from sfa.util.faults import SfaAPIError # for convenience and smoother translation - we should get rid of these functions eventually @@ -121,6 +121,7 @@ class Xrn: # provide either urn, or (hrn + type) def __init__ (self, xrn, type=None): if not xrn: xrn = "" + # user has specified xrn : guess if urn or hrn if Xrn.is_urn(xrn): self.hrn=None @@ -154,7 +155,8 @@ class Xrn: # self.authority keeps a list if not hasattr(self,'authority'): self.authority=Xrn.hrn_auth_list(self.hrn) - + + def get_leaf(self): self._normalize() return self.leaf