From: Stephen Soltesz Date: Thu, 6 Aug 2009 20:01:46 +0000 (+0000) Subject: allow user to delete some attributes, such as 'gid' which break calls to X-Git-Tag: sfa-0.9-1~113 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=34a85fa3d9a21c639208f0cbb0ea74eaf6535118;p=sfa.git allow user to delete some attributes, such as 'gid' which break calls to 'sfi.py add' if the old gid is still present. --- diff --git a/sfa/client/setRecord.py b/sfa/client/setRecord.py index 0d7dd16d..c3379be5 100755 --- a/sfa/client/setRecord.py +++ b/sfa/client/setRecord.py @@ -47,7 +47,10 @@ def editDict(args, recordDict, options): replaceDict({vect.split("=")[0]: returnVal(vect.split("=")[1])}, 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