mirror of
https://github.com/esphome/esphome.git
synced 2024-11-26 08:55:22 +01:00
Add Python 2 deprecation notice (#784)
* Add Python 2 deprecation notice * Update __main__.py
This commit is contained in:
parent
6542be5588
commit
c18050bda0
1 changed files with 5 additions and 0 deletions
|
@ -509,6 +509,11 @@ def run_esphome(argv):
|
||||||
_LOGGER.error("Missing configuration parameter, see esphome --help.")
|
_LOGGER.error("Missing configuration parameter, see esphome --help.")
|
||||||
return 1
|
return 1
|
||||||
|
|
||||||
|
if IS_PY2:
|
||||||
|
_LOGGER.warning("You're using ESPHome with python 2. Support for python 2 is deprecated "
|
||||||
|
"and will be removed in 1.15.0. Please reinstall ESPHome with python 3.6 "
|
||||||
|
"or higher.")
|
||||||
|
|
||||||
if args.command in PRE_CONFIG_ACTIONS:
|
if args.command in PRE_CONFIG_ACTIONS:
|
||||||
try:
|
try:
|
||||||
return PRE_CONFIG_ACTIONS[args.command](args)
|
return PRE_CONFIG_ACTIONS[args.command](args)
|
||||||
|
|
Loading…
Reference in a new issue