mirror of
https://github.com/esphome/esphome.git
synced 2024-11-10 09:17:46 +01:00
Improve handling of no upload option
Fixes https://github.com/esphome/issues/issues/596
This commit is contained in:
parent
5348b36a7c
commit
ccf3da2a5a
1 changed files with 3 additions and 1 deletions
|
@ -35,7 +35,9 @@ def get_serial_ports():
|
||||||
|
|
||||||
def choose_prompt(options):
|
def choose_prompt(options):
|
||||||
if not options:
|
if not options:
|
||||||
raise ValueError
|
raise EsphomeError("Found no valid options for upload/logging, please make sure relevant "
|
||||||
|
"sections (ota, mqtt, ...) are in your configuration and/or the device "
|
||||||
|
"is plugged in.")
|
||||||
|
|
||||||
if len(options) == 1:
|
if len(options) == 1:
|
||||||
return options[0][1]
|
return options[0][1]
|
||||||
|
|
Loading…
Reference in a new issue