1
0
mirror of https://github.com/esphome/esphome.git synced 2025-09-10 23:32:23 +01:00

Switch to 115200 baud upload if 460800 fails (#856)

* Switch to 115200 baud upload if 460800 fails

* Update __main__.py
This commit is contained in:
Otto Winter
2019-11-14 12:42:50 +01:00
committed by GitHub
parent 092bca0d63
commit 694395ac91
2 changed files with 21 additions and 8 deletions

View File

@@ -184,6 +184,7 @@ def run_external_command(func, *cmd, **kwargs):
except Exception as err: # pylint: disable=broad-except
_LOGGER.error(u"Running command failed: %s", err)
_LOGGER.error(u"Please try running %s locally.", full_cmd)
return 1
finally:
sys.argv = orig_argv
sys.exit = orig_exit
@@ -216,6 +217,7 @@ def run_external_process(*cmd, **kwargs):
except Exception as err: # pylint: disable=broad-except
_LOGGER.error(u"Running command failed: %s", err)
_LOGGER.error(u"Please try running %s locally.", full_cmd)
return 1
finally:
if capture_stdout:
# pylint: disable=lost-exception