Commit fbee13ed authored by Grégory Wisniewski's avatar Grégory Wisniewski

Enable SQL queries logging previously disabled by error.


git-svn-id: https://svn.erp5.org/repos/neo/branches/prototype3@485 71dcc9de-d417-0410-9af5-da40c76e7ee4
parent 6fe1e76b
......@@ -77,14 +77,14 @@ class MySQLDatabaseManager(DatabaseManager):
"""Query data from a database."""
conn = self.conn
try:
# printable_char_list = []
# for c in query.split('\n', 1)[0][:70]:
# if c not in string.printable or c in '\t\x0b\x0c\r':
# c = '\\x%02x' % ord(c)
# printable_char_list.append(c)
# query_part = ''.join(printable_char_list)
#
# logging.debug('querying %s...', query_part)
printable_char_list = []
for c in query.split('\n', 1)[0][:70]:
if c not in string.printable or c in '\t\x0b\x0c\r':
c = '\\x%02x' % ord(c)
printable_char_list.append(c)
query_part = ''.join(printable_char_list)
logging.debug('querying %s...', query_part)
conn.query(query)
r = conn.store_result()
if r is not None:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment