Commit 069b95e5 by Julien Muchembled

mysql: small optimization by making 'escape' a property

1 parent 3e91d269
......@@ -131,9 +131,10 @@ class MySQLDatabaseManager(DatabaseManager):
raise DatabaseFailure('MySQL error %d: %s' % (m[0], m[1]))
return r
def escape(self, s):
@property
def escape(self):
"""Escape special characters in a string."""
return self.conn.escape_string(s)
return self.conn.escape_string
def erase(self):
self.query(
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!