git://git.onelab.eu
/
sfa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e588513
)
fix bug in hrn_to_urn()
author
Tony Mack
<tmack@paris.CS.Princeton.EDU>
Fri, 7 Sep 2012 16:25:04 +0000
(12:25 -0400)
committer
Tony Mack
<tmack@paris.CS.Princeton.EDU>
Fri, 7 Sep 2012 16:25:04 +0000
(12:25 -0400)
sfa/util/xrn.py
patch
|
blob
|
history
diff --git
a/sfa/util/xrn.py
b/sfa/util/xrn.py
index
9a5740c
..
9656304
100644
(file)
--- a/
sfa/util/xrn.py
+++ b/
sfa/util/xrn.py
@@
-244,6
+244,9
@@
class Xrn:
else:
self.authority = Xrn.hrn_auth_list(self.hrn)
name = Xrn.hrn_leaf(self.hrn)
+ # separate name from id
+ name_parts = name.split("-")
+ name = name_parts[0]
authority_string = self.get_authority_urn()
if self.type == None:
@@
-252,7
+255,7
@@
class Xrn:
urn = "+".join(['',authority_string,self.type,Xrn.unescape(name)])
if hasattr(self, 'id') and self.id:
- urn = "%s
:
%s" % (urn, self.id)
+ urn = "%s
-
%s" % (urn, self.id)
self.urn = Xrn.URN_PREFIX + urn