From 9c6ac3056bd90ea7e1a6108cfedfcc09a0091df8 Mon Sep 17 00:00:00 2001 From: Anna Wiggins Date: Thu, 5 Apr 2012 17:16:21 -0400 Subject: [PATCH] battleman: Fixed quitting --- battleman.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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):