battleman: Fixed quitting

This commit is contained in:
Anna Rose 2012-04-05 17:16:21 -04:00
parent 035d8cba37
commit 9c6ac3056b

View File

@ -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):