Control C does not cancel the CLI cleanly

When a user attempts to terminate the CLI with CTL+C a stack
trace is printed to the screen.  When downloading files the
partial amount downloaded will not be cleaned up.  In most
cases the user redirects to stdout, thus this program cannot
clean that up.

Fixes Bug: 1130390

Change-Id: If9f8ffc72b422d5dbd5969eecde8904238dd8860
This commit is contained in:
John Bresnahan
2013-02-19 11:58:54 -10:00
parent d831b5eb27
commit 1a3d40ccb4
+3
View File
@@ -440,6 +440,9 @@ class OpenStackImagesShell(object):
args.func(client, args)
except exc.Unauthorized:
raise exc.CommandError("Invalid OpenStack Identity credentials.")
except KeyboardInterrupt:
LOG.warn('... terminating glance client')
sys.exit(1)
@utils.arg('command', metavar='<subcommand>', nargs='?',
help='Display help for <subcommand>')