From 9d81be7af5db789f9f7627fd0bc7ce7f9fc3956e Mon Sep 17 00:00:00 2001 From: stamparm Date: Mon, 25 Feb 2013 14:12:57 +0100 Subject: [PATCH] Removing redundant piece of code --- plugins/dbms/mysql/syntax.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/dbms/mysql/syntax.py b/plugins/dbms/mysql/syntax.py index f1ff5afc9..0eb65208c 100644 --- a/plugins/dbms/mysql/syntax.py +++ b/plugins/dbms/mysql/syntax.py @@ -19,9 +19,9 @@ class Syntax(GenericSyntax): def escaper(value): retVal = None try: - retVal = "0x%s" % binascii.hexlify(value.strip("'")) + retVal = "0x%s" % binascii.hexlify(value) except UnicodeEncodeError: - retVal = "CONVERT(0x%s USING utf8)" % "".join("%.2x" % ord(_) for _ in utf8encode(value.strip("'"))) + retVal = "CONVERT(0x%s USING utf8)" % "".join("%.2x" % ord(_) for _ in utf8encode(value)) return retVal return Syntax._escape(expression, quote, escaper)