diff options
author | cedricbonhomme <devnull@localhost> | 2010-09-03 11:15:05 +0200 |
---|---|---|
committer | cedricbonhomme <devnull@localhost> | 2010-09-03 11:15:05 +0200 |
commit | 9b0709ccd8993e718d2152e3d411a34bc944c6ab (patch) | |
tree | 60f742d5421e632328048bf97d3c47390d4f7734 | |
parent | Improvements of the history page. (diff) | |
download | newspipe-9b0709ccd8993e718d2152e3d411a34bc944c6ab.tar.gz newspipe-9b0709ccd8993e718d2152e3d411a34bc944c6ab.tar.bz2 newspipe-9b0709ccd8993e718d2152e3d411a34bc944c6ab.zip |
Added detection of URL errors.
-rwxr-xr-x | feedgetter.py | 7 |
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. |