fix typo. CreateSliver will pass slice keys to ProtoGeni Aggregates
[sfa.git] / sfa / client / setRecord.py
index 0d7dd16..5f48e68 100755 (executable)
@@ -7,11 +7,10 @@ Updates record objects
 faiyaza at cs dot princeton dot edu
 Copyright (c) 2009 Board of Trustees, Princeton University
 
-$Id$
-$HeadURL$
 """
 
 import sys
+sys.path.append('.')
 import os
 from optparse import OptionParser
 from pprint import pprint
@@ -44,10 +43,13 @@ def editDict(args, recordDict, options):
  
         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:
-            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