aboutsummaryrefslogtreecommitdiff
path: root/src/interfaces/python/pgdb.py
diff options
context:
space:
mode:
authorD'Arcy J.M. Cain <darcy@druid.net>2001-03-30 12:04:43 +0000
committerD'Arcy J.M. Cain <darcy@druid.net>2001-03-30 12:04:43 +0000
commitf9ae973c5e280af171ed36f6ea88f0be7e7829e1 (patch)
tree6f454fdefb86c5d4ca76a6d9a1ef99aff354bfc5 /src/interfaces/python/pgdb.py
parentdcbbdb1b3ee17bee849f96734f0c40d2b74f2ab5 (diff)
downloadpostgresql-f9ae973c5e280af171ed36f6ea88f0be7e7829e1.tar.gz
postgresql-f9ae973c5e280af171ed36f6ea88f0be7e7829e1.zip
Correct indenting in _quote() function.
Fix submitted by Andrew Kuchling <akuchlin@mems-exchange.org>
Diffstat (limited to 'src/interfaces/python/pgdb.py')
-rw-r--r--src/interfaces/python/pgdb.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/interfaces/python/pgdb.py b/src/interfaces/python/pgdb.py
index f6dc5fefd5c..156350abb24 100644
--- a/src/interfaces/python/pgdb.py
+++ b/src/interfaces/python/pgdb.py
@@ -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