aboutsummaryrefslogtreecommitdiff
path: root/pyAggr3g470r.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 /pyAggr3g470r.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 'pyAggr3g470r.py')
-rwxr-xr-xpyAggr3g470r.py12
1 files changed, 8 insertions, 4 deletions
diff --git a/pyAggr3g470r.py b/pyAggr3g470r.py
index 442cf08f..a9ffd87a 100755
--- a/pyAggr3g470r.py
+++ b/pyAggr3g470r.py
@@ -89,7 +89,7 @@ class Root:
target="_blank"><img src="%s" width="28" height="28" /></a></h2>\n""" % \
(rss_feed_id, \
self.feeds[rss_feed_id][5].encode('utf-8'), \
- self.feeds[rss_feed_id][3].encode('utf-8'), \
+ utils.remove_html_tags(self.feeds[rss_feed_id][3].encode('utf-8')), \
self.feeds[rss_feed_id][4].encode('utf-8'), \
self.feeds[rss_feed_id][2].encode('utf-8'))
@@ -107,7 +107,8 @@ class Root:
html += article[1].encode('utf-8') + \
" - " + not_read_begin + \
"""<a href="/description/%s:%s" rel="noreferrer" target="_blank">%s</a>""" % \
- (rss_feed_id, article[0].encode('utf-8'),article[2].encode('utf-8')) + \
+ (rss_feed_id, article[0].encode('utf-8'), \
+ utils.remove_html_tags(article[2].encode('utf-8'))) + \
not_read_end + \
"<br />\n"
html += "<br />\n"
@@ -605,8 +606,8 @@ class Root:
When a change is detected, reload the base.
"""
mon = gamin.WatchMonitor()
- mon.watch_file(utils.sqlite_base, self.update)
time.sleep(10)
+ mon.watch_file(utils.sqlite_base, self.update)
ret = mon.event_pending()
try:
print "Watching %s" % utils.sqlite_base
@@ -647,7 +648,10 @@ if __name__ == '__main__':
# Point of entry in execution mode
LOCKER = threading.Lock()
root = Root()
- root.update()
+ if not os.path.isfile(utils.sqlite_base):
+ utils.create_base()
+ else:
+ root.update()
try:
import gamin
thread_watch_base = threading.Thread(None, root.watch_base, None, ())
bgstack15