battleman: Fixed quitting
This commit is contained in:
parent
035d8cba37
commit
9c6ac3056b
|
@ -120,7 +120,7 @@ class CommandParser(Cmd):
|
||||||
cmds = self.completenames(comm)
|
cmds = self.completenames(comm)
|
||||||
num_cmds = len(cmds)
|
num_cmds = len(cmds)
|
||||||
if num_cmds == 1:
|
if num_cmds == 1:
|
||||||
getattr(self, 'do_'+cmds[0])(data)
|
return getattr(self, 'do_'+cmds[0])(data)
|
||||||
elif num_cmds > 1:
|
elif num_cmds > 1:
|
||||||
sys.stdout.write('Error: Ambiguous command: {}'.format(comm))
|
sys.stdout.write('Error: Ambiguous command: {}'.format(comm))
|
||||||
else:
|
else:
|
||||||
|
@ -408,7 +408,7 @@ class CommandParser(Cmd):
|
||||||
|
|
||||||
|
|
||||||
def do_EOF(self, line):
|
def do_EOF(self, line):
|
||||||
self.do_quit(line)
|
return self.do_quit(line)
|
||||||
|
|
||||||
|
|
||||||
def do_quit(self, line):
|
def do_quit(self, line):
|
||||||
|
|
Loading…
Reference in New Issue
Block a user