def _db_escape_string(self, s):
"""meta escaping, returns quoted string for use in sql statements"""
- if not isinstance(s, basestring):
- # Avoid potential UnicodeEncodeError in python-2.x by
- # only calling str() when it's absolutely necessary.
- s = str(s)
- # This is equivalent to the _quote function from pysqlite 1.1.
+ if not isinstance(s, basestring):
+ # Avoid potential UnicodeEncodeError in python-2.x by
+ # only calling str() when it's absolutely necessary.
+ s = str(s)
+ # This is equivalent to the _quote function from pysqlite 1.1.
return "'%s'" % s.replace("'", "''")
def _db_init_connection(self, config):