Do not display warning message if -n or count is set
Someone using the count option is already aware of the limitations. The warning is useless.
This commit is contained in:
parent
9e72f864b3
commit
2915a04eba
2 changed files with 5 additions and 2 deletions
|
|
@ -162,6 +162,7 @@ class BaseApplication(object):
|
||||||
logging_options.add_option('-a', '--save-responses', action='store_true', help='save every response')
|
logging_options.add_option('-a', '--save-responses', action='store_true', help='save every response')
|
||||||
self._parser.add_option_group(logging_options)
|
self._parser.add_option_group(logging_options)
|
||||||
self._parser.add_option('--shell-completion', action='store_true', help=optparse.SUPPRESS_HELP)
|
self._parser.add_option('--shell-completion', action='store_true', help=optparse.SUPPRESS_HELP)
|
||||||
|
self._is_default_count = True
|
||||||
|
|
||||||
def deinit(self):
|
def deinit(self):
|
||||||
self.weboob.want_stop()
|
self.weboob.want_stop()
|
||||||
|
|
@ -263,7 +264,10 @@ class BaseApplication(object):
|
||||||
modif += 1
|
modif += 1
|
||||||
else:
|
else:
|
||||||
if count and i - modif == count:
|
if count and i - modif == count:
|
||||||
raise MoreResultsAvailable()
|
if self._is_default_count:
|
||||||
|
raise MoreResultsAvailable()
|
||||||
|
else:
|
||||||
|
return
|
||||||
yield sub
|
yield sub
|
||||||
|
|
||||||
def _do_complete(self, backend, count, selected_fields, function, *args, **kwargs):
|
def _do_complete(self, backend, count, selected_fields, function, *args, **kwargs):
|
||||||
|
|
|
||||||
|
|
@ -167,7 +167,6 @@ class ReplApplication(Cmd, ConsoleApplication):
|
||||||
self._parser.add_option_group(formatting_options)
|
self._parser.add_option_group(formatting_options)
|
||||||
|
|
||||||
self._interactive = False
|
self._interactive = False
|
||||||
self._is_default_count = True
|
|
||||||
self.working_path = WorkingPath()
|
self.working_path = WorkingPath()
|
||||||
self._change_prompt()
|
self._change_prompt()
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue