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:
0f2ac2c
)
fix set_authority(). replace invalid char in sliver_id with '-'
author
Tony Mack
<tmack@paris.CS.Princeton.EDU>
Fri, 7 Sep 2012 14:37:16 +0000
(10:37 -0400)
committer
Tony Mack
<tmack@paris.CS.Princeton.EDU>
Fri, 7 Sep 2012 14:37:16 +0000
(10:37 -0400)
sfa/util/xrn.py
patch
|
blob
|
history
diff --git
a/sfa/util/xrn.py
b/sfa/util/xrn.py
index
e548fa5
..
414a8a6
100644
(file)
--- a/
sfa/util/xrn.py
+++ b/
sfa/util/xrn.py
@@
-124,7
+124,7
@@
class Xrn:
self.hrn=None
self.urn=xrn
if id:
self.hrn=None
self.urn=xrn
if id:
- self.urn = "%s
:
%s" % (self.urn, str(id))
+ self.urn = "%s
-
%s" % (self.urn, str(id))
self.urn_to_hrn()
else:
self.urn=None
self.urn_to_hrn()
else:
self.urn=None
@@
-173,11
+173,7
@@
class Xrn:
update the authority section of an existing urn
"""
authority_hrn = self.get_authority_hrn()
update the authority section of an existing urn
"""
authority_hrn = self.get_authority_hrn()
- if not authority_hrn.startswith(authority):
- hrn = ".".join([authority,authority_hrn, self.get_leaf()])
- else:
- hrn = ".".join([authority_hrn, self.get_leaf()])
-
+ hrn = ".".join([authority, self.get_leaf()])
self.hrn = hrn
self.hrn_to_urn()
self._normalize()
self.hrn = hrn
self.hrn_to_urn()
self._normalize()