From 6239b1aaf790ed18138f41b49f0577b31a59ce31 Mon Sep 17 00:00:00 2001 From: cedricbonhomme Date: Mon, 13 Jun 2011 14:36:23 +0200 Subject: Minor improvement: test the number of articles per feed to import. --- pyAggr3g470r.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pyAggr3g470r.py b/pyAggr3g470r.py index 80145da3..6f543523 100755 --- a/pyAggr3g470r.py +++ b/pyAggr3g470r.py @@ -288,7 +288,7 @@ class Root: html += '
\n' html += "For each feed only load the " - html += """\n""" % (max_nb_articles) + html += """\n""" % (max_nb_articles) html += " last articles." if utils.MAX_NB_ARTICLES == -1: html += "
All articles are currently loaded.\n" @@ -1106,9 +1106,11 @@ class Root: change_feed_url.exposed = True - def set_max_articles(self, max_nb_articles=0): + def set_max_articles(self, max_nb_articles=1): """ """ + if max_nb_articles < -1 or max_nb_articles == 0: + max_nb_articles = 1 utils.MAX_NB_ARTICLES = int(max_nb_articles) self.update() return self.management() -- cgit