]> git.llucax.com Git - software/sercom-old.git/blobdiff - src/sc_dbq
Bugfix para que convierta enteros y floats.
[software/sercom-old.git] / 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