X-Git-Url: http://git.onelab.eu/?p=sfa.git;a=blobdiff_plain;f=sfa%2Futil%2Fxrn.py;h=e3871b5fb5decc20fc48b6cf90de6f994ec6bb84;hp=ff60571454d93731d5390070fbaed089a9ab9c4c;hb=bc77b3e1ce73d7f748d9cc978472dba246034d74;hpb=e8b16b96a23e1ab54e780587cc7cc0345a1ddf0e diff --git a/sfa/util/xrn.py b/sfa/util/xrn.py index ff605714..e3871b5f 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