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:
5ef8d76
)
update a urn's type in Xrn.__init__()
author
Tony Mack
<tmack@paris.CS.Princeton.EDU>
Fri, 7 Sep 2012 16:02:55 +0000
(12:02 -0400)
committer
Tony Mack
<tmack@paris.CS.Princeton.EDU>
Fri, 7 Sep 2012 16:02:55 +0000
(12:02 -0400)
sfa/util/xrn.py
patch
|
blob
|
history
diff --git
a/sfa/util/xrn.py
b/sfa/util/xrn.py
index
38656a7
..
9a5740c
100644
(file)
--- a/
sfa/util/xrn.py
+++ b/
sfa/util/xrn.py
@@
-123,16
+123,18
@@
class Xrn:
if Xrn.is_urn(xrn):
self.hrn=None
self.urn=xrn
- if type:
- self.type=type
if id:
self.urn = "%s-%s" % (self.urn, str(id))
self.urn_to_hrn()
+ if type:
+ self.type=type
+ self.hrn_to_urn()
else:
self.urn=None
self.hrn=xrn
self.type=type
self.hrn_to_urn()
+
self._normalize()
# happens all the time ..
# if not type: