diff options
author | cedricbonhomme <devnull@localhost> | 2010-02-06 19:58:06 +0100 |
---|---|---|
committer | cedricbonhomme <devnull@localhost> | 2010-02-06 19:58:06 +0100 |
commit | 06bfe7f177a167db31a3e0497b997bd60f040115 (patch) | |
tree | 5edae2e9afe84a5b86c93fed6c802eb6f7ffd21b | |
parent | Bug fix. Really stupid error in the evaluation of numbers of articles by stre... (diff) | |
download | newspipe-06bfe7f177a167db31a3e0497b997bd60f040115.tar.gz newspipe-06bfe7f177a167db31a3e0497b997bd60f040115.tar.bz2 newspipe-06bfe7f177a167db31a3e0497b997bd60f040115.zip |
Bug fix : there was a problem with utf-8 in the SQLite3 database with Python 2.6. Solved with http://www.python.org/doc/2.6/library/sqlite3.html#using-adapters-to-store-additional-python-types-in-sqlite-databases .
-rw-r--r-- | feedgetter.py | 1 | ||||
-rw-r--r-- | pyAggr3g470r.py | 3 |
2 files changed, 1 insertions, 3 deletions
diff --git a/feedgetter.py b/feedgetter.py index aa755632..d65ef4b8 100644 --- a/feedgetter.py +++ b/feedgetter.py @@ -39,6 +39,7 @@ class FeedGetter(object): print "./feed.lst not found" exit(0) # Create the base if not exists. + sqlite3.register_adapter(str, lambda s : s.decode('utf-8')) self.conn = sqlite3.connect("./var/feed.db", isolation_level = None) self.c = self.conn.cursor() self.c.execute('''create table if not exists rss_feed diff --git a/pyAggr3g470r.py b/pyAggr3g470r.py index ff43f1b7..a446ca0b 100644 --- a/pyAggr3g470r.py +++ b/pyAggr3g470r.py @@ -257,9 +257,6 @@ class Root: c.execute("UPDATE rss_feed SET article_readed=1 WHERE article_link='" + article_link + "'") conn.commit() c.close() - - - except Exception, e: pass |