--- backuo/cmd.py 2007-10-19 13:54:25.000000000 +0200 +++ cmd.py 2007-10-19 14:19:54.000000000 +0200 @@ -130,6 +130,13 @@ line = raw_input(self.prompt) except EOFError: line = 'EOF' + except KeyboardInterrupt: + self.stdout.write('\nare you sure you want to exit? y/n ') + answer ='' + while (answer != 'y') & (answer != 'n'): + answer = raw_input() + if answer == 'y': + exit(0) else: self.stdout.write(self.prompt) self.stdout.flush()