Browse Source

[supervise] supression du except socket.gaierror

Maxime Alves LIRMM@home 3 years ago
parent
commit
3ab8af7f74
1 changed files with 4 additions and 9 deletions
  1. 4
    9
      pyheatpump/cli.py

+ 4
- 9
pyheatpump/cli.py View File

@@ -7,7 +7,6 @@ import time
7 7
 import json
8 8
 import os
9 9
 import re
10
-import socket
11 10
 import sys
12 11
 import time
13 12
 import urllib
@@ -192,14 +191,10 @@ def supervise(since):
192 191
         **{'path': get_path}
193 192
     }
194 193
 
195
-    try:
196
-        get_resp = requests.get(
197
-            url=build_url(get_url),
198
-            verify=False
199
-        )
200
-    except socket.gaierror as exc:
201
-        logger.error('Socket error : %s', exc)
202
-        sys.exit(-1)
194
+    get_resp = requests.get(
195
+        url=build_url(get_url),
196
+        verify=False
197
+    )
203 198
 
204 199
     control_data = get_resp.json()
205 200
     if Heatpump(mac_address).control(control_data):

Loading…
Cancel
Save