Gracefully handle keyboard interrupts (^C)

This commit is contained in:
Rob Crittenden 2008-10-21 14:42:13 -04:00
parent 475265ed37
commit bc5edcf893

View File

@ -277,7 +277,10 @@ class CLI(object):
def run_cmd(self, cmd, argv):
kw = self.parse(cmd, argv)
self.run_interactive(cmd, kw)
try:
self.run_interactive(cmd, kw)
except KeyboardInterrupt:
return
def run_interactive(self, cmd, kw):
for param in cmd.params():