From a5a4c2e44a90cb227a86eabca202a1833dfc85d9 Mon Sep 17 00:00:00 2001 From: Florent Date: Tue, 7 Jan 2014 18:59:19 +0100 Subject: [PATCH] Accept 0 and negative value for count We already accept zero and negative value with the option -n, for consistency it is good to accept it in interactive mode. --- weboob/tools/application/repl.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/weboob/tools/application/repl.py b/weboob/tools/application/repl.py index cce21bb0..e0d44b63 100644 --- a/weboob/tools/application/repl.py +++ b/weboob/tools/application/repl.py @@ -832,8 +832,8 @@ class ReplApplication(Cmd, ConsoleApplication): self.options.count = count self._is_default_count = False else: - print >>sys.stderr, 'Number must be at least 1.' - return 2 + self.options.count = None + self._is_default_count = False else: if self.options.count is None: print 'Counting disabled.'