From 7f5aef193d8344d90b6f49405884d73c76993460 Mon Sep 17 00:00:00 2001 From: Josh Holtrop Date: Mon, 3 Jan 2011 08:27:08 -0500 Subject: [PATCH] always exit on empty command line --- dwtt | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/dwtt b/dwtt index 9ff0614..1be6372 100755 --- a/dwtt +++ b/dwtt @@ -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()