Mercurial > libervia-backend
changeset 2306:07deebea71f3
jp (common): fixed the use of --last-item when "-n [node]" is used
author | Goffi <goffi@goffi.org> |
---|---|
date | Wed, 05 Jul 2017 15:04:45 +0200 |
parents | 972e33507609 |
children | 8fa7edd0da24 |
files | frontends/src/jp/common.py |
diffstat | 1 files changed, 5 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/frontends/src/jp/common.py Wed Jul 05 15:04:43 2017 +0200 +++ b/frontends/src/jp/common.py Wed Jul 05 15:04:45 2017 +0200 @@ -433,8 +433,11 @@ else: command = 'new' - if self.args.last_item and command != 'last': - self.parser.error(_(u"--last-item can't be used with a specified item")) + if self.args.last_item: + if pubsub_item is None: + command = 'last' + elif command != 'last': + self.parser.error(_(u"--last-item can't be used with a specified item")) if not force_item and command in ('new', 'last', 'edit'): # we need a temporary file