jp (common): fixed the use of --last-item when "-n [node]" is used
This commit is contained in:
parent
c56d3fc759
commit
702c5e78e9
1 changed files with 5 additions and 2 deletions
|
|
@ -433,8 +433,11 @@ class BaseEdit(object):
|
|||
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
|
||||
|
|
|
|||
Loading…
Reference in a new issue