]> granicus.if.org Git - postgresql/commitdiff
Correct indenting in _quote() function.
authorD'Arcy J.M. Cain <darcy@druid.net>
Fri, 30 Mar 2001 12:04:43 +0000 (12:04 +0000)
committerD'Arcy J.M. Cain <darcy@druid.net>
Fri, 30 Mar 2001 12:04:43 +0000 (12:04 +0000)
Fix submitted by Andrew Kuchling <akuchlin@mems-exchange.org>

src/interfaces/python/pgdb.py

index f6dc5fefd5c5164f4c5e132d204c36cd6c0c12b0..156350abb241688a47c022c470f23994813f9c2f 100644 (file)
@@ -263,16 +263,16 @@ def _quote(x):
                x = "'" + string.replace(
                                string.replace(str(x), '\\', '\\\\'), "'", "''") + "'"
 
-   elif type(x) in (types.IntType, types.LongType, types.FloatType):
+       elif type(x) in (types.IntType, types.LongType, types.FloatType):
                pass
-   elif x is None:
+       elif x is None:
                x = 'NULL'
-   elif hasattr(x, '__pg_repr__'):
+       elif hasattr(x, '__pg_repr__'):
                x = x.__pg_repr__()
-   else:
+       else:
                raise InterfaceError, 'do not know how to handle type %s' % type(x)
 
-   return x
+       return x
 
 def _quoteparams(s, params):
        if hasattr(params, 'has_key'):
@@ -401,7 +401,7 @@ BINARY = pgdbType()
 INTEGER = pgdbType('int2', 'int4', 'serial')
 LONG = pgdbType('int8')
 FLOAT = pgdbType('float4', 'float8', 'numeric')
-BOOL = pgdbType('bool') 
+BOOL = pgdbType('bool')
 MONEY = pgdbType('money')
 
 # this may be problematic as type are quite different ... I hope it won't hurt