Explorar o código

fixes #53: do not convert integers longer than 8 bytes

Davide Alberani %!s(int64=9) %!d(string=hai) anos
pai
achega
8c6ec6a15b
Modificáronse 1 ficheiros con 4 adicións e 1 borrados
  1. 4 1
      backend.py

+ 4 - 1
backend.py

@@ -80,7 +80,10 @@ class EventManDB(object):
         except:
             pass
         try:
-            return int(obj)
+            i_obj = int(obj)
+            if i_obj > 2**64 - 1:
+                return obj
+            return i_obj
         except:
             pass
         return obj