File tree 3 files changed +5
-7
lines changed 3 files changed +5
-7
lines changed Original file line number Diff line number Diff line change 21
21
22
22
import machineid
23
23
import requests
24
- from requests import HTTPError
25
24
26
25
from sparsezoo .utils .gdpr import is_gdpr_country
27
26
from sparsezoo .utils .helpers import disable_request_logs
@@ -139,12 +138,12 @@ def _send_request():
139
138
body = response .content
140
139
if _DEBUG :
141
140
print (body )
142
- except HTTPError as http_error :
141
+ except Exception as exception :
143
142
if _DEBUG :
144
- print (http_error )
143
+ print (exception )
145
144
146
145
if raise_errors :
147
- raise http_error
146
+ raise exception
148
147
149
148
thread = threading .Thread (target = _send_request )
150
149
thread .start ()
Original file line number Diff line number Diff line change 17
17
18
18
import geocoder
19
19
import requests
20
- from requests import HTTPError
21
20
22
21
from sparsezoo .utils .helpers import disable_request_logs
23
22
@@ -79,7 +78,7 @@ def get_country_code() -> Optional[str]:
79
78
geo = geocoder .ip (ip )
80
79
81
80
return geo .country
82
- except HTTPError :
81
+ except Exception :
83
82
return None
84
83
85
84
Original file line number Diff line number Diff line change 20
20
from datetime import date
21
21
22
22
23
- version_base = "1.5.0 "
23
+ version_base = "1.5.1 "
24
24
is_release = False # change to True to set the generated version as a release version
25
25
26
26
You can’t perform that action at this time.
0 commit comments