[pypy-svn] pypy default: sqlite: cut converter names at '(' character
amauryfa
commits-noreply at bitbucket.org
Thu Feb 10 11:41:26 CET 2011
Author: Amaury Forgeot d'Arc <amauryfa at gmail.com>
Branch:
Changeset: r41764:4823c4f0dfcb
Date: 2011-02-09 19:48 +0100
http://bitbucket.org/pypy/pypy/changeset/4823c4f0dfcb/
Log: sqlite: cut converter names at '(' character
diff --git a/lib_pypy/_sqlite3.py b/lib_pypy/_sqlite3.py
--- a/lib_pypy/_sqlite3.py
+++ b/lib_pypy/_sqlite3.py
@@ -834,6 +834,8 @@
decltype = sqlite.sqlite3_column_decltype(self.statement, i)
if decltype is not None:
decltype = decltype.split()[0] # if multiple words, use first, eg. "INTEGER NOT NULL" => "INTEGER"
+ if '(' in decltype:
+ decltype = decltype[:decltype.index('(')]
converter = converters.get(decltype.upper(), None)
self.row_cast_map.append(converter)
More information about the Pypy-commit
mailing list