diff --git a/battleman.py b/battleman.py index c055749..002aa89 100755 --- a/battleman.py +++ b/battleman.py @@ -120,7 +120,7 @@ class CommandParser(Cmd): cmds = self.completenames(comm) num_cmds = len(cmds) if num_cmds == 1: - getattr(self, 'do_'+cmds[0])(data) + return getattr(self, 'do_'+cmds[0])(data) elif num_cmds > 1: sys.stdout.write('Error: Ambiguous command: {}'.format(comm)) else: @@ -408,7 +408,7 @@ class CommandParser(Cmd): def do_EOF(self, line): - self.do_quit(line) + return self.do_quit(line) def do_quit(self, line):