From 633d20d0238f998d8f31cf557a81d014be3cee10 Mon Sep 17 00:00:00 2001 From: Jimmy Hedman Date: Wed, 11 Apr 2018 22:51:56 +0200 Subject: [PATCH] Remove sleeps. (#5) * Remove sleeps. - the sleeps is not needed. * Make sleep depending on environment variable. - set QUICKWIZARD to true to disable sleeps. * Changed env-name and made it work without env. - It only worked when environment variable was defined. Now it works with variable unset, which should be the normal case. - Added ESPHOMEYAML_ as prefix so it's ESPHOMEYAML_QUICKWIZARD. --- esphomeyaml/wizard.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/esphomeyaml/wizard.py b/esphomeyaml/wizard.py index 55afc3246e..7ba0b71423 100644 --- a/esphomeyaml/wizard.py +++ b/esphomeyaml/wizard.py @@ -3,7 +3,6 @@ from __future__ import print_function import codecs import os import unicodedata -from time import sleep import voluptuous as vol @@ -70,6 +69,12 @@ logger: """ +if os.getenv('ESPHOMEYAML_QUICKWIZARD', False): + def sleep(time): + pass +else: + from time import sleep + def print_step(step, big): print()