From 2bb083744092c28ef580f8abb5ce5e236e793a74 Mon Sep 17 00:00:00 2001 From: Daniel Thompson Date: Wed, 21 Oct 2020 20:48:12 +0100 Subject: [PATCH] tools: wasptool: Fix verbose/not-verbose handling Fixes: 2839a04 ("tools: wasptool: Hide the stack trace on pexpect timeout") Signed-off-by: Daniel Thompson --- tools/wasptool | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/wasptool b/tools/wasptool index 59f9b6f..339344e 100755 --- a/tools/wasptool +++ b/tools/wasptool @@ -289,6 +289,9 @@ if __name__ == '__main__': if not args.verbose: print_log(console.logfile) sys.exit(1) + if not args.verbose: + console.logfile.close() + console.logfile = None macaddr = console.match.group(1) console.expect('Exit console using Ctrl-X')