diff options
author | Rob Austein <sra@hactrn.net> | 2010-03-04 19:31:02 +0000 |
---|---|---|
committer | Rob Austein <sra@hactrn.net> | 2010-03-04 19:31:02 +0000 |
commit | d9a1181b7a4fb60c7845aff3135212e5242a813e (patch) | |
tree | 75951ef76776a3447751e69b8b5f612f6e9d14a5 /rpkid | |
parent | 370760ec0b4bac001281a6cf5b3ec0de1c116cff (diff) |
Checkpoint
svn path=/rpkid/rpki/cli.py; revision=3023
Diffstat (limited to 'rpkid')
-rw-r--r-- | rpkid/rpki/cli.py | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/rpkid/rpki/cli.py b/rpkid/rpki/cli.py index 4960c387..32844896 100644 --- a/rpkid/rpki/cli.py +++ b/rpkid/rpki/cli.py @@ -28,8 +28,12 @@ except ImportError: class Cmd(cmd.Cmd): + emptyline_repeats_last_command = False + + EOF_exits_command_loop = True + identchars = cmd.IDENTCHARS + "/-." - + histfile = None def __init__(self, argv = None): @@ -40,8 +44,9 @@ class Cmd(cmd.Cmd): self.cmdloop_with_history() def do_EOF(self, arg): - print - return True + if self.EOF_exits_command_loop and self.prompt: + print + return self.EOF_exits_command_loop def do_exit(self, arg): return True @@ -49,7 +54,8 @@ class Cmd(cmd.Cmd): do_quit = do_exit def emptyline(self): - pass + if self.emptyline_repeats_last_command: + cmd.Cmd.emptyline(self) def filename_complete(self, text, line, begidx, endidx): return glob.glob(text + "*") |