Skip to content

Commit 0d015bd

Browse files
author
Richard Jones
committed
change as per last message in patch [SF#1429391]
1 parent 8f1ab51 commit 0d015bd

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

roundup/backends/back_postgresql.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#$Id: back_postgresql.py,v 1.34 2006-08-29 04:20:50 richard Exp $
1+
#$Id: back_postgresql.py,v 1.35 2006-10-03 23:15:09 richard Exp $
22
#
33
# Copyright (c) 2003 Martynas Sklyzmantas, Andrey Lebedev <[email protected]>
44
#
@@ -12,8 +12,10 @@
1212
import os, shutil, popen2, time
1313
try:
1414
import psycopg
15+
from psycopg import QuotedString
1516
except:
16-
import psycopg2 as psycopg
17+
from psycopg2 import psycopg1 as psycopg
18+
from psycopg2.extensions import QuotedString
1719
import logging
1820

1921
from roundup import hyperdb, date
@@ -202,7 +204,7 @@ def sql_commit(self, fail_ok=False):
202204
def sql_stringquote(self, value):
203205
''' psycopg.QuotedString returns a "buffer" object with the
204206
single-quotes around it... '''
205-
return str(psycopg.QuotedString(str(value)))[1:-1]
207+
return str(QuotedString(str(value)))[1:-1]
206208

207209
def sql_index_exists(self, table_name, index_name):
208210
sql = 'select count(*) from pg_indexes where ' \

0 commit comments

Comments
 (0)