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:
8f2102f
)
fix bug
author
Tony Mack
<tmack@paris.CS.Princeton.EDU>
Mon, 10 Sep 2012 19:54:45 +0000
(15:54 -0400)
committer
Tony Mack
<tmack@paris.CS.Princeton.EDU>
Mon, 10 Sep 2012 19:54:45 +0000
(15:54 -0400)
sfa/util/xrn.py
patch
|
blob
|
history
diff --git
a/sfa/util/xrn.py
b/sfa/util/xrn.py
index
493cbba
..
764bd41
100644
(file)
--- a/
sfa/util/xrn.py
+++ b/
sfa/util/xrn.py
@@
-120,14
+120,13
@@
class Xrn:
if not xrn: xrn = ""
# user has specified xrn : guess if urn or hrn
self.id = id
if not xrn: xrn = ""
# user has specified xrn : guess if urn or hrn
self.id = id
+ self.type = type
+
if Xrn.is_urn(xrn):
self.hrn=None
self.urn=xrn
if Xrn.is_urn(xrn):
self.hrn=None
self.urn=xrn
- if id:
- self.urn = "%s-%s" % (self.urn, str(id))
self.urn_to_hrn()
self.urn_to_hrn()
- if type:
- self.type=type
+ if id:
self.hrn_to_urn()
else:
self.urn=None
self.hrn_to_urn()
else:
self.urn=None
@@
-245,8
+244,6
@@
class Xrn:
self.authority = Xrn.hrn_auth_list(self.hrn)
name = Xrn.hrn_leaf(self.hrn)
# separate name from id
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:
authority_string = self.get_authority_urn()
if self.type == None: