Skip to content

Commit a4391d7

Browse files
OSupdate: add more network error handling
1 parent a4cab65 commit a4391d7

File tree

1 file changed

+2
-1
lines changed
  • internal_filesystem/builtin/apps/com.micropythonos.osupdate/assets

1 file changed

+2
-1
lines changed

internal_filesystem/builtin/apps/com.micropythonos.osupdate/assets/osupdate.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -478,8 +478,9 @@ def _is_network_error(self, exception):
478478
# -104 = ECONNRESET (connection reset by peer)
479479
# -110 = ETIMEDOUT (connection timed out)
480480
# -118 = EHOSTUNREACH (no route to host)
481+
# -202 = DNS/connection error (network not ready)
481482
network_indicators = [
482-
'-113', '-104', '-110', '-118', # Error codes
483+
'-113', '-104', '-110', '-118', '-202', # Error codes
483484
'econnaborted', 'econnreset', 'etimedout', 'ehostunreach', # Error names
484485
'connection reset', 'connection aborted', # Error messages
485486
'broken pipe', 'network unreachable', 'host unreachable',

0 commit comments

Comments
 (0)