Fixed last_executed_query test failure on Oracle

This commit is contained in:
Shai Berger 2013-07-08 23:47:02 +03:00
parent dab921751d
commit c0a4894dca
1 changed files with 1 additions and 1 deletions

View File

@ -269,7 +269,7 @@ WHEN (new.%(col_name)s IS NULL)
# http://cx-oracle.sourceforge.net/html/cursor.html#Cursor.statement
# The DB API definition does not define this attribute.
statement = cursor.statement
if not six.PY3 and not isinstance(statement, unicode):
if statement and not six.PY3 and not isinstance(statement, unicode):
statement = statement.decode('utf-8')
# Unlike Psycopg's `query` and MySQLdb`'s `_last_executed`, CxOracle's
# `statement` doesn't contain the query parameters. refs #20010.