# Copyright (c) 2008 Board of Trustees, Princeton University
#
# Permission is hereby granted, free of charge, to any person obtaining
# Copyright (c) 2008 Board of Trustees, Princeton University
#
# Permission is hereby granted, free of charge, to any person obtaining
# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE WORK OR THE USE OR OTHER DEALINGS
# IN THE WORK.
# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE WORK OR THE USE OR OTHER DEALINGS
# IN THE WORK.
-def hrn_authfor_hrn(
- parenthrn, hrn): return Xrn.hrn_is_auth_for_hrn(parenthrn, hrn)
+def hrn_authfor_hrn(parenthrn, hrn):
+ return Xrn.hrn_is_auth_for_hrn(parenthrn, hrn)
- return [x.replace('--sep--', '\\.') for x in hrn.replace('\\.', '--sep--').split('.')]
+ return [x.replace('--sep--', '\\.')
+ for x in hrn.replace('\\.', '--sep--').split('.')]
# Return the HRN authority chain from top to bottom.
# e.g. hrn_auth_chain('a\.b.c.d') -> ['a\.b', 'a\.b.c']
# Return the HRN authority chain from top to bottom.
# e.g. hrn_auth_chain('a\.b.c.d') -> ['a\.b', 'a\.b.c']
urn = "+".join(['', authority_string, Xrn.unescape(name)])
else:
urn = "+".join(['', authority_string,
urn = "+".join(['', authority_string, Xrn.unescape(name)])
else:
urn = "+".join(['', authority_string,