always exit on empty command line

This commit is contained in:
Josh Holtrop 2011-01-03 08:27:08 -05:00
parent 4edabbdf3b
commit 7f5aef193d

8
dwtt
View File

@ -39,9 +39,13 @@ def main(argv):
while True:
cmdline = doCmdWindow()
cmd = Command(cmdline)
if not processCommand(cmd, ds):
if cmdline.strip() == '':
break
cmd = Command(cmdline)
res = processCommand(cmd, ds)
if type(res).__name__ == 'bool':
if not res:
break
def doCmdWindow():
c = CmdWindow()