# HG changeset patch # User Goffi # Date 1499259885 -7200 # Node ID 07deebea71f307c02df126749a349277d13db1bc # Parent 972e335076094827f98f399577c06973ed671fe3 jp (common): fixed the use of --last-item when "-n [node]" is used diff -r 972e33507609 -r 07deebea71f3 frontends/src/jp/common.py --- 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