Updating hrn_to_urn
authorJosh Karlin <jkarlin@bbn.com>
Thu, 22 Apr 2010 21:54:47 +0000 (21:54 +0000)
committerJosh Karlin <jkarlin@bbn.com>
Thu, 22 Apr 2010 21:54:47 +0000 (21:54 +0000)
sfa/util/namespace.py

index d2006e5..45ce06a 100644 (file)
@@ -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])