Mercurial > libervia-backend
changeset 1641:44a14f83e64b
jp (base): fixed verbose option + there is a new line on ProgressErrorHandler only if the progress bar is actually displayed
author | Goffi <goffi@goffi.org> |
---|---|
date | Sun, 22 Nov 2015 17:35:32 +0100 |
parents | d470affbe65c |
children | 7ec7ce9cdc4c |
files | frontends/src/jp/base.py |
diffstat | 1 files changed, 3 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/frontends/src/jp/base.py Sun Nov 22 17:33:30 2015 +0100 +++ b/frontends/src/jp/base.py Sun Nov 22 17:35:32 2015 +0100 @@ -188,7 +188,7 @@ progress_parent.add_argument("-P", "--progress", action="store_true", help=_("Show progress bar")) verbose_parent = self.parents['verbose'] = argparse.ArgumentParser(add_help=False) - verbose_parent.add_argument('--verbose', '-v', action='count', help=_(u"Add a verbosity level (can be used multiple times)")) + verbose_parent.add_argument('--verbose', '-v', action='count', default=0, help=_(u"Add a verbosity level (can be used multiple times)")) def add_parser_options(self): self.parser.add_argument('--version', action='version', version=("%(name)s %(version)s %(copyleft)s" % {'name': PROG_NAME, 'version': self.version, 'copyleft': COPYLEFT})) @@ -497,7 +497,8 @@ if profile != self.profile: return if uid == self.progress_id: - self.disp('') # progress is not finished, so we skip a line + if self.args.progress: + self.disp('') # progress is not finished, so we skip a line if self.host.quit_on_progress_end: self.onProgressError(message) self.host.quitFromSignal(1)