From f8407fed8f2465e7f3d6fd22bf314745cd668121 Mon Sep 17 00:00:00 2001 From: Victor Golovanenko Date: Wed, 6 Aug 2025 08:42:53 +0300 Subject: [PATCH] fix: enable_shell_access.py: correct connection errors handling. --- enable_shell_access.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/enable_shell_access.py b/enable_shell_access.py index 68e35c5..a539273 100644 --- a/enable_shell_access.py +++ b/enable_shell_access.py @@ -162,7 +162,7 @@ if __name__ == '__main__': if input('Config successfully uploaded. Do you want to reboot ONU now? (Y/n) : ').lower() != 'n': try: resp = http.post('/post.json', json={'module': 'dev_config', 'reboot': 1}) - except (httpx.ConnectError, httpx.ReadError): + except (httpx.TimeoutException, httpx.NetworkError): print('ONU reboot error. The device is probably already rebooting.') sys.exit(0) else: