aboutsummaryrefslogtreecommitdiff
path: root/feedgetter.py
diff options
context:
space:
mode:
authorcedricbonhomme <devnull@localhost>2010-09-03 11:15:05 +0200
committercedricbonhomme <devnull@localhost>2010-09-03 11:15:05 +0200
commit9b0709ccd8993e718d2152e3d411a34bc944c6ab (patch)
tree60f742d5421e632328048bf97d3c47390d4f7734 /feedgetter.py
parentImprovements of the history page. (diff)
downloadnewspipe-9b0709ccd8993e718d2152e3d411a34bc944c6ab.tar.gz
newspipe-9b0709ccd8993e718d2152e3d411a34bc944c6ab.tar.bz2
newspipe-9b0709ccd8993e718d2152e3d411a34bc944c6ab.zip
Added detection of URL errors.
Diffstat (limited to 'feedgetter.py')
-rwxr-xr-xfeedgetter.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/feedgetter.py b/feedgetter.py
index 7d36d910..6b875c64 100755
--- a/feedgetter.py
+++ b/feedgetter.py
@@ -69,10 +69,11 @@ class FeedGetter(object):
self.conn = sqlite3.connect(utils.sqlite_base, isolation_level = None)
self.c = self.conn.cursor()
- # Add the articles in the base.
- self.add_into_sqlite(the_good_url)
+ if utils.detect_url_errors([the_good_url]) == []:
+ # if ressource is available add the articles in the base.
+ self.add_into_sqlite(the_good_url)
- self.conn.commit()
+ self.conn.commit()
self.c.close()
# Release this part of code.
bgstack15