Scrapy, a fast high-level web crawling & scraping framework for Python.
Silenced confusing sqlite3.ProgrammingError exception. For more info see: http://twistedmatrix.com/trac/ticket/4040
Pablo Hoffman36431a14390a
diff --git a/scrapy/utils/sqlite.py b/scrapy/utils/sqlite.pyindex 01c13f96e..d205d4508 100644--- a/scrapy/utils/sqlite.py+++ b/scrapy/utils/sqlite.py@@ -11,7 +11,8 @@ class SqliteDict(DictMixin):def __init__(self, database=None, table="dict"):self.database = database or ':memory:'self.table = table- self.conn = sqlite3.connect(self.database)+ # about check_same_thread: http://twistedmatrix.com/trac/ticket/4040+ self.conn = sqlite3.connect(self.database, check_same_thread=False)q = "create table if not exists %s (key text primary key, value blob)" \% tableself.conn.execute(q)@@ -91,7 +92,8 @@ class SqlitePriorityQueue(object):def __init__(self, database=None, table="queue"):self.database = database or ':memory:'self.table = table- self.conn = sqlite3.connect(self.database)+ # about check_same_thread: http://twistedmatrix.com/trac/ticket/4040+ self.conn = sqlite3.connect(self.database, check_same_thread=False)q = "create table if not exists %s (id integer primary key, " \"priority real key, message blob)" % tableself.conn.execute(q)