[supervise] supression du except socket.gaierror
This commit is contained in:
parent
8a4438bdf6
commit
3ab8af7f74
1 changed files with 4 additions and 9 deletions
|
|
@ -7,7 +7,6 @@ import time
|
|||
import json
|
||||
import os
|
||||
import re
|
||||
import socket
|
||||
import sys
|
||||
import time
|
||||
import urllib
|
||||
|
|
@ -192,14 +191,10 @@ def supervise(since):
|
|||
**{'path': get_path}
|
||||
}
|
||||
|
||||
try:
|
||||
get_resp = requests.get(
|
||||
url=build_url(get_url),
|
||||
verify=False
|
||||
)
|
||||
except socket.gaierror as exc:
|
||||
logger.error('Socket error : %s', exc)
|
||||
sys.exit(-1)
|
||||
get_resp = requests.get(
|
||||
url=build_url(get_url),
|
||||
verify=False
|
||||
)
|
||||
|
||||
control_data = get_resp.json()
|
||||
if Heatpump(mac_address).control(control_data):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue