Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#19 bool columns don't work with python 2.2

closed-fixed
nobody
General (125)
5
2004-08-18
2004-02-24
Anonymous
No

A convertor for bool type doesn't register in Python 2.2
because there is no builtin bool type and it is
implemented as class.

Here is a patch:

diff -r -u
C:\tmp\SQLObject-0.5.1\SQLObject/Converters.py
C:\Python22\Lib\site-
packages\SQLObject/Converters.py
--- C:\tmp\SQLObject-0.5.1\SQLObject/Converters.py
Sat Nov 1 19:40:02 2003

+++
C:\Python22\Lib\site-packages\SQLObject/Converters.py
Tue Feb 24 14:56
:55 2004
@@ -113,7 +113,10 @@
else:
return '0'

-registerConverter(type(TRUE), BoolConverter)
+if type(TRUE)==InstanceType:
+ registerConverter(BOOL, BoolConverter)
+else:
+ registerConverter(type(TRUE), BoolConverter)

def FloatConverter(value, db):
return repr(value)

Discussion

  • Ian Bicking
    Ian Bicking
    2004-08-18

    • status: open --> closed-fixed
     
  • Ian Bicking
    Ian Bicking
    2004-08-18

    Logged In: YES
    user_id=210337

    Fixed in svn