From c5970d7fb2011dc19759cbcf41b995c24497e9aa Mon Sep 17 00:00:00 2001 From: Tony Mack Date: Mon, 12 Jul 2010 15:33:40 +0000 Subject: [PATCH] merge from geni-api branch --- sfa/util/namespace.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sfa/util/namespace.py b/sfa/util/namespace.py index e898f3ca..c771d717 100644 --- a/sfa/util/namespace.py +++ b/sfa/util/namespace.py @@ -75,8 +75,9 @@ def urn_to_hrn(urn): # join list elements using '.' hrn = '.'.join([part.replace(':', '.') for part in hrn_parts if part]) + # Remove the authority name (e.g. '.sa') if type == 'authority': - hrn = hrn.replace ('.sa', '') + hrn = hrn[:hrn.rindex('.')] return str(hrn), str(type) -- 2.43.0