bug fix: here commit should be outside the if test
[sfa.git] / sfa / client / setRecord.py
index c3379be..fd7fa83 100755 (executable)
@@ -12,6 +12,7 @@ $HeadURL$
 """
 
 import sys
+sys.path.append('.')
 import os
 from optparse import OptionParser
 from pprint import pprint
@@ -44,13 +45,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:
-                       if vect in recordDict:
-                               del recordDict[vect]
-                       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