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:
@@ -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
|
||||
|
Reference in New Issue
Block a user