git://git.onelab.eu
/
sfa.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix typo. CreateSliver will pass slice keys to ProtoGeni Aggregates
[sfa.git]
/
sfa
/
client
/
setRecord.py
diff --git
a/sfa/client/setRecord.py
b/sfa/client/setRecord.py
index
0d7dd16
..
5f48e68
100755
(executable)
--- a/
sfa/client/setRecord.py
+++ b/
sfa/client/setRecord.py
@@
-7,11
+7,10
@@
Updates record objects
faiyaza at cs dot princeton dot edu
Copyright (c) 2009 Board of Trustees, Princeton University
faiyaza at cs dot princeton dot edu
Copyright (c) 2009 Board of Trustees, Princeton University
-$Id$
-$HeadURL$
"""
import sys
"""
import sys
+sys.path.append('.')
import os
from optparse import OptionParser
from pprint import pprint
import os
from optparse import OptionParser
from pprint import pprint
@@
-44,10
+43,13
@@
def editDict(args, recordDict, options):
elif vect.count("="):
# reassign value
elif vect.count("="):
# reassign value
- replaceDict({vect.split("=")[0]: returnVal(
vect.split("=")[1]
)},
+ replaceDict({vect.split("=")[0]: returnVal(
"=".join(vect.split("=")[1:])
)},
recordDict, options)
else:
recordDict, options)
else:
- raise TypeError, "Argument error: Records are updated with \n" \
+ if vect in recordDict:
+ del recordDict[vect]
+ else:
+ raise TypeError, "Argument error: Records are updated with \n" \
"key=val1,val2,valN or\n" \
"key+=val1,val2,valN \n%s Unknown key/val" % vect
"key=val1,val2,valN or\n" \
"key+=val1,val2,valN \n%s Unknown key/val" % vect