image_upload: allow ctrl-c
Allow operators to run ctrl-c during image uplaod and gracefully exit. Change-Id: I6e4aead3e4a03d1025b987bc2f0305614e4d0c18 Closes-Bug: #1746724
This commit is contained in:
parent
12ffd71970
commit
e72065cd33
|
@ -61,7 +61,10 @@ class UploadImage(command.Command):
|
|||
self.log.debug("take_action(%s)" % parsed_args)
|
||||
uploader = image_uploader.ImageUploadManager(
|
||||
parsed_args.config_files)
|
||||
uploader.upload()
|
||||
try:
|
||||
uploader.upload()
|
||||
except KeyboardInterrupt: # ctrl-c
|
||||
self.log.warning('Upload was interrupted by ctrl-c.')
|
||||
|
||||
|
||||
class BuildImage(command.Command):
|
||||
|
|
Loading…
Reference in New Issue