From ca4b189638dfee88339e7917dfdb6cb6c12cb19b Mon Sep 17 00:00:00 2001 From: Wolfgange3311999 Date: Wed, 27 Jul 2016 16:37:52 -0500 Subject: [PATCH] Fixed enclosure hardware test issue --- mycroft/client/enclosure/enclosure.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/mycroft/client/enclosure/enclosure.py b/mycroft/client/enclosure/enclosure.py index 36a14bde12..c492340152 100644 --- a/mycroft/client/enclosure/enclosure.py +++ b/mycroft/client/enclosure/enclosure.py @@ -184,11 +184,13 @@ class Enclosure: self.__register_events() def setup(self): - if str2bool(self.config.get('must_upload')): + must_upload = self.config.get('must_upload') + if must_upload is not None and str2bool(must_upload): ConfigurationManager.set('enclosure', 'must_upload', False) self.upload_hex() - if str2bool(self.config.get('must_start_test')): + must_start_test = self.config.get('must_start_test') + if must_start_test is not None and str2bool(must_start_test): ConfigurationManager.set('enclosure', 'must_start_test', False) time.sleep(0.5) # Ensure arduino has booted self.writer.write("test.begin")