From: Josh Karlin Date: Thu, 22 Apr 2010 21:54:47 +0000 (+0000) Subject: Updating hrn_to_urn X-Git-Tag: geni-apiv1-totrunk~37 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=0bf44636d2555b909a9929dd91222f1234c6bb0e;p=sfa.git Updating hrn_to_urn --- diff --git a/sfa/util/namespace.py b/sfa/util/namespace.py index d2006e50..45ce06a7 100644 --- a/sfa/util/namespace.py +++ b/sfa/util/namespace.py @@ -91,7 +91,11 @@ def hrn_to_urn(hrn, type=None): name = get_leaf(hrn) if authority.startswith("plc"): - urn = "+".join(['',authority.replace('.',':'),type,name]) + if type == None: + urn = "+".join(['',authority.replace('.',':'),name]) + else: + urn = "+".join(['',authority.replace('.',':'),type,name]) + else: urn = "+".join(['',authority,type,name])