]> git.llucax.com Git - software/sercom-old.git/commitdiff
Bugfix para que convierta enteros y floats.
authorLeandro Lucarella <llucax@gmail.com>
Sun, 6 Mar 2005 22:17:33 +0000 (22:17 +0000)
committerLeandro Lucarella <llucax@gmail.com>
Sun, 6 Mar 2005 22:17:33 +0000 (22:17 +0000)
src/sc_dbq

index 1c90a3f48dce631ffef0c6c3974c28db346322e8..2b063345eb3d9a68d1937f21b86e787f24989a2b 100755 (executable)
@@ -20,8 +20,14 @@ def args2dict(l, conn):
     for arg in l:
         key, val = arg.split('=')
         if val == 'None': val = None
-        if val == 'True': val = True
-        if val == 'False': val = False
+        elif val == 'True': val = True
+        elif val == 'False': val = False
+        elif val.isdigit():
+            val = int(val)
+        else:
+            try:
+                val = float(val)
+            except ValueError: pass
         d[key] = val
     return d