allow not applying any patch
This commit is contained in:
parent
4d6c9c3f7f
commit
1c9a3ed29f
|
@ -161,8 +161,11 @@ def apply_attachments(repo, issue):
|
|||
for i, attachment in enumerate(attachments):
|
||||
print i, attachment.created_on, '%6d bytes' % attachment.filesize, attachment.filename
|
||||
while True:
|
||||
indexes = click.prompt('Which patch would you like to apply (id separated by spaces) ?', type=str)
|
||||
indexes = click.prompt('Which patch would you like to apply (id separated by spaces) ?', type=str, default='')
|
||||
try:
|
||||
indexes = indexes.strip()
|
||||
if not indexes:
|
||||
break
|
||||
indexes = map(int, indexes.split())
|
||||
if not all(i < len(attachments) for i in indexes):
|
||||
raise ValueError('invalid values', indexes)
|
||||
|
|
Loading…
Reference in New Issue