From d06eb344e906c2e45d41f5ca12745394f8578ba2 Mon Sep 17 00:00:00 2001 From: HappyZ Date: Wed, 14 Feb 2018 11:57:04 -0600 Subject: [PATCH] correct behavior when Device Busy error occurs --- libMeasurement.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/libMeasurement.py b/libMeasurement.py index ab4e73f..bed1acb 100755 --- a/libMeasurement.py +++ b/libMeasurement.py @@ -248,8 +248,11 @@ def wrapper(args): except KeyboardInterrupt: break except Exception as e: - print(str(e)) - time.sleep(5) + err = str(e) + print(err) + if 'Busy' in err: + break + time.sleep(10) counter += 1