dabo Commit
Revision 6402
Date: 2011-02-06 14:15:00 -0800 (Sun, 06 Feb 2011)
Author: Ed
Trac: http://trac.dabodev.com/changeset/6402
Changed:
U trunk/dabo/db/dDataSet.py
Log:
I was getting the text_factory error from SQLite that we had run into in the
past when doing filtering. This should fix that problem, but if it doesn't work
with other encodings, please let me know.
Diff:
Modified: trunk/dabo/db/dDataSet.py
===================================================================
--- trunk/dabo/db/dDataSet.py 2011-02-06 19:17:01 UTC (rev 6401)
+++ trunk/dabo/db/dDataSet.py 2011-02-06 22:15:00 UTC (rev 6402)
@@ -352,6 +352,7 @@
self._connection = sqlite.connect(":memory:",
detect_types=(sqlite.PARSE_DECLTYPES|sqlite.PARSE_COLNAMES),
isolation_level="EXCLUSIVE")
+ self._connection.text_factory = str
if self._cursor is None:
self._cursor =
self._connection.cursor(factory=DictCursor)
@@ -431,12 +432,6 @@
def _setEncoding(self, encoding):
self._encoding = encoding
- try:
- self._connection.text_factory = lambda s:unicode(s,
self._encoding, "replace")
- except AttributeError:
- # The connection has not yet been set, but it will once
- # queries is executed
- pass
def _getUnfilteredDataSet(self):
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-dev
Searchable Archives: http://leafe.com/archives/search/dabo-dev
This message:
http://leafe.com/archives/byMID/[email protected]