No longer rely on requests (#23685)
* No longer rely on requests * Lint * Missed a few parts * Fix types * Fix more types * Update __main__.py * Fix tests * Lint * Fix script
This commit is contained in:
parent
f019e2a204
commit
cc13713abd
10 changed files with 271 additions and 197 deletions
|
@ -42,8 +42,10 @@ def check_real(func):
|
|||
|
||||
|
||||
# Guard a few functions that would make network connections
|
||||
location.detect_location_info = check_real(location.detect_location_info)
|
||||
location.elevation = check_real(location.elevation)
|
||||
location.async_detect_location_info = \
|
||||
check_real(location.async_detect_location_info)
|
||||
location.async_get_elevation = \
|
||||
check_real(location.async_get_elevation)
|
||||
util.get_local_ip = lambda: '127.0.0.1'
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue