aboutsummaryrefslogtreecommitdiff
path: root/source/pyAggr3g470r.py
diff options
context:
space:
mode:
authorCédric Bonhomme <kimble.mandel@gmail.com>2013-04-01 23:47:01 +0200
committerCédric Bonhomme <kimble.mandel@gmail.com>2013-04-01 23:47:01 +0200
commit9f84c3947adf66bf1d0f8fad941ff717ab805585 (patch)
tree4a9d3739972f1ac30a7caba033251abe0bbabc21 /source/pyAggr3g470r.py
parentIf feed id is not valid, return directly the error page. (diff)
downloadnewspipe-9f84c3947adf66bf1d0f8fad941ff717ab805585.tar.gz
newspipe-9f84c3947adf66bf1d0f8fad941ff717ab805585.tar.bz2
newspipe-9f84c3947adf66bf1d0f8fad941ff717ab805585.zip
Test if ids of the feed/articles exists.
Diffstat (limited to 'source/pyAggr3g470r.py')
-rwxr-xr-xsource/pyAggr3g470r.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/source/pyAggr3g470r.py b/source/pyAggr3g470r.py
index 1c2009fe..b12039d4 100755
--- a/source/pyAggr3g470r.py
+++ b/source/pyAggr3g470r.py
@@ -199,9 +199,11 @@ class pyAggr3g470r(object):
"""
try:
feed_id, article_id = param.split(':')
+ article = self.mongo.get_articles(feed_id, article_id)
+ if article == []:
+ return self.error("<p>This article do not exists.</p>")
feed = self.mongo.get_feed(feed_id)
articles = self.mongo.get_articles(feed_id)
- article = self.mongo.get_articles(feed_id, article_id)
except:
return self.error("<p>Bad URL. This article do not exists.</p>")
bgstack15