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:
0e9738c
)
in get_authority, return the hrn as is if it is only 1 level deep
author
Tony Mack
<tmack@cs.princeton.edu>
Tue, 16 Dec 2008 03:09:24 +0000
(
03:09
+0000)
committer
Tony Mack
<tmack@cs.princeton.edu>
Tue, 16 Dec 2008 03:09:24 +0000
(
03:09
+0000)
util/misc.py
patch
|
blob
|
history
diff --git
a/util/misc.py
b/util/misc.py
index
90c257b
..
b2e2b8e
100644
(file)
--- a/
util/misc.py
+++ b/
util/misc.py
@@
-5,8
+5,10
@@
def get_leaf(hrn):
return ".".join(parts[-1:])
def get_authority(hrn):
- parts = hrn.split(".")
\r
- return ".".join(parts[:-1])
\r
+ parts = hrn.split(".")
+ if len(parts) > 1:
+ return ".".join(parts[:-1])
+ return hrn
def get_auth_type(type):
if (type=="slice") or (type=="user") or (type=="sa"):