1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-06-12 01:53:07 +03:00

ArduinoOTA: forward errors from Update.begin to espota.py

If Update.begin fails, instead of printing “No response from device”,
espota.py will print the actual error message from the Updater.
This commit is contained in:
Ivan Grokhotkov
2017-05-09 18:43:42 +08:00
committed by Ivan Grokhotkov
parent 01e1c586cb
commit 03baea27ef
3 changed files with 21 additions and 8 deletions

View File

@ -95,7 +95,7 @@ def serve(remoteAddr, localAddr, remotePort, localPort, password, filename, comm
sent = sock2.sendto(message.encode(), remote_address)
sock2.settimeout(10)
try:
data = sock2.recv(37).decode()
data = sock2.recv(128).decode()
except:
logging.error('No Answer')
sock2.close()