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:
1900794
)
fix error code checking in update
author
Scott Baker
<bakers@cs.arizona.edu>
Tue, 28 Apr 2009 01:52:27 +0000
(
01:52
+0000)
committer
Scott Baker
<bakers@cs.arizona.edu>
Tue, 28 Apr 2009 01:52:27 +0000
(
01:52
+0000)
cmdline/sfi.py
patch
|
blob
|
history
diff --git
a/cmdline/sfi.py
b/cmdline/sfi.py
index
e121444
..
db716f5
100755
(executable)
--- a/
cmdline/sfi.py
+++ b/
cmdline/sfi.py
@@
-467,11
+467,13
@@
def update(opts, args):
try:
cred = get_slice_cred(record.get_name())
except ServerException, e:
try:
cred = get_slice_cred(record.get_name())
except ServerException, e:
- if "PermissionError" in e.args[0]:
+ # XXX smbaker -- once we have better error return codes, update this
+ # to do something better than a string compare
+ if "Permission error" in e.args[0]:
cred = get_auth_cred()
else:
raise
cred = get_auth_cred()
else:
raise
- elif record.get_type() in ["
sa", "ma", "node
"]:
+ elif record.get_type() in ["
authority
"]:
cred = get_auth_cred()
else:
raise "unknown record type" + record.get_type()
cred = get_auth_cred()
else:
raise "unknown record type" + record.get_type()