fix: enable_shell_access.py: correct connection errors handling.
This commit is contained in:
@@ -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:
|
||||
|
Reference in New Issue
Block a user