This repository was archived by the owner on Jun 3, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +5
-7
lines changed Expand file tree Collapse file tree 3 files changed +5
-7
lines changed Original file line number Diff line number Diff line change 2121
2222import machineid
2323import requests
24- from requests import HTTPError
2524
2625from sparsezoo .utils .gdpr import is_gdpr_country
2726from sparsezoo .utils .helpers import disable_request_logs
@@ -139,12 +138,12 @@ def _send_request():
139138 body = response .content
140139 if _DEBUG :
141140 print (body )
142- except HTTPError as http_error :
141+ except Exception as exception :
143142 if _DEBUG :
144- print (http_error )
143+ print (exception )
145144
146145 if raise_errors :
147- raise http_error
146+ raise exception
148147
149148 thread = threading .Thread (target = _send_request )
150149 thread .start ()
Original file line number Diff line number Diff line change 1717
1818import geocoder
1919import requests
20- from requests import HTTPError
2120
2221from sparsezoo .utils .helpers import disable_request_logs
2322
@@ -79,7 +78,7 @@ def get_country_code() -> Optional[str]:
7978 geo = geocoder .ip (ip )
8079
8180 return geo .country
82- except HTTPError :
81+ except Exception :
8382 return None
8483
8584
Original file line number Diff line number Diff line change 2020from datetime import date
2121
2222
23- version_base = "1.5.0 "
23+ version_base = "1.5.1 "
2424is_release = False # change to True to set the generated version as a release version
2525
2626
You can’t perform that action at this time.
0 commit comments