X-Git-Url: http://git.onelab.eu/?p=sfa.git;a=blobdiff_plain;f=sfa%2Futil%2Fxrn.py;h=19b1fc18a0f0607ab4dadf4bda36228a11d6b896;hp=083e620f2158c4264197356db28de2f14c872a36;hb=cedf37c8661ec0b05349274962bf2db9cfa6a24d;hpb=6e46a2373bcda1c1793d18936cc40fb39beb149a diff --git a/sfa/util/xrn.py b/sfa/util/xrn.py index 083e620f..19b1fc18 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