diff options
author | Rob Crittenden <rcritten@redhat.com> | 2008-10-21 14:42:13 -0400 |
---|---|---|
committer | Rob Crittenden <rcritten@redhat.com> | 2008-10-21 14:42:13 -0400 |
commit | bc5edcf8939d5ed2bcd3ee9dcc3bc80979bf563a (patch) | |
tree | 5889f3c9a8f500f833982b21b79a2fce95c6b78c | |
parent | 475265ed378cd0879d22e2b9bc59f7eab742fee9 (diff) | |
download | freeipa-bc5edcf8939d5ed2bcd3ee9dcc3bc80979bf563a.tar.gz freeipa-bc5edcf8939d5ed2bcd3ee9dcc3bc80979bf563a.tar.xz freeipa-bc5edcf8939d5ed2bcd3ee9dcc3bc80979bf563a.zip |
Gracefully handle keyboard interrupts (^C)
-rw-r--r-- | ipalib/cli.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/ipalib/cli.py b/ipalib/cli.py index 625280344..ab7e36204 100644 --- a/ipalib/cli.py +++ b/ipalib/cli.py @@ -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(): |