Skip to content

Commit 460b4c5

Browse files
committed
Fix modify -F with -C.
1 parent bb0ae5d commit 460b4c5

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

bugz/cli.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -415,13 +415,16 @@ def modify(settings):
415415
except IOError as error:
416416
raise BugzError('unable to read file: %s: %s' %
417417
(settings.comment_from, error))
418+
else:
419+
settings.comment = ''
418420

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

423425
if hasattr(settings, 'comment_editor'):
424-
settings.comment = block_edit('Enter comment:')
426+
settings.comment = block_edit('Enter comment:',
427+
comment_from=settings.comment)
425428

426429
params = {}
427430
params['ids'] = [settings.bugid]

bugz/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ def block_edit(comment, comment_from=''):
109109
initial_text = '\n'.join(['BUGZ: %s' % line
110110
for line in comment.splitlines()])
111111
new_text = launch_editor(BUGZ_COMMENT_TEMPLATE % initial_text,
112-
comment_from)
112+
comment_from=comment_from)
113113

114114
if new_text.strip():
115115
return new_text

0 commit comments

Comments
 (0)