aboutsummaryrefslogtreecommitdiff
path: root/feedgetter.py
diff options
context:
space:
mode:
authorcedricbonhomme <devnull@localhost>2010-03-23 12:01:05 +0100
committercedricbonhomme <devnull@localhost>2010-03-23 12:01:05 +0100
commit2b263f301764e6c2e52b764f689639d56ba9c372 (patch)
treebc48677fcbd34c18edc89ef52ea83dbaa6a43a91 /feedgetter.py
parentMinor bugfix. (diff)
downloadnewspipe-2b263f301764e6c2e52b764f689639d56ba9c372.tar.gz
newspipe-2b263f301764e6c2e52b764f689639d56ba9c372.tar.bz2
newspipe-2b263f301764e6c2e52b764f689639d56ba9c372.zip
Bug fix: when the database do not exists at first launch.
Diffstat (limited to 'feedgetter.py')
-rwxr-xr-xfeedgetter.py14
1 files changed, 1 insertions, 13 deletions
diff --git a/feedgetter.py b/feedgetter.py
index 1ea9d9d9..7e6e4c71 100755
--- a/feedgetter.py
+++ b/feedgetter.py
@@ -37,19 +37,7 @@ class FeedGetter(object):
Initializes the base and variables.
"""
# 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 feeds
- (feed_title text, feed_site_link text, \
- feed_link text PRIMARY KEY, feed_image_link text,
- mail text)''')
- self.c.execute('''create table if not exists articles
- (article_date text, article_title text, \
- article_link text PRIMARY KEY, article_description text, \
- article_readed text, feed_link text)''')
- self.conn.commit()
- self.c.close()
+ utils.create_base()
# mutex to protect the SQLite base
self.locker = threading.Lock()
bgstack15