Author: Brian Kearns <[email protected]>
Branch:
Changeset: r62135:5b25d91f1f35
Date: 2013-03-06 15:40 -0500
http://bitbucket.org/pypy/pypy/changeset/5b25d91f1f35/
Log: redundant call to encode
diff --git a/lib_pypy/_sqlite3.py b/lib_pypy/_sqlite3.py
--- a/lib_pypy/_sqlite3.py
+++ b/lib_pypy/_sqlite3.py
@@ -985,9 +985,7 @@
def __init__(self, connection, sql):
self.__con = connection
- if isinstance(sql, unicode):
- sql = sql.encode('utf-8')
- elif not isinstance(sql, str):
+ if not isinstance(sql, str):
raise ValueError("sql must be a string")
first_word = self._statement_kind = sql.lstrip().split(" ")[0].upper()
if first_word in ("INSERT", "UPDATE", "DELETE", "REPLACE"):
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit