Skip to content

Commit

Permalink
Fix modify -F with -C.
Browse files Browse the repository at this point in the history
  • Loading branch information
glebius committed Dec 21, 2023
1 parent bb0ae5d commit 460b4c5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion bugz/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -415,13 +415,16 @@ def modify(settings):
except IOError as error:
raise BugzError('unable to read file: %s: %s' %
(settings.comment_from, error))
else:
settings.comment = ''

if hasattr(settings, 'assigned_to') and \
hasattr(settings, 'reset_assigned_to'):
raise BugzError('--assigned-to and --unassign cannot be used together')

if hasattr(settings, 'comment_editor'):
settings.comment = block_edit('Enter comment:')
settings.comment = block_edit('Enter comment:',
comment_from=settings.comment)

params = {}
params['ids'] = [settings.bugid]
Expand Down
2 changes: 1 addition & 1 deletion bugz/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ def block_edit(comment, comment_from=''):
initial_text = '\n'.join(['BUGZ: %s' % line
for line in comment.splitlines()])
new_text = launch_editor(BUGZ_COMMENT_TEMPLATE % initial_text,
comment_from)
comment_from=comment_from)

if new_text.strip():
return new_text
Expand Down

0 comments on commit 460b4c5

Please sign in to comment.