mirror of
https://github.com/OpenFreeEnergy/openfe.git
synced 2026-06-04 14:14:22 +08:00
* apply E741: ambiguous variable name check * apply E713: 'not in' fixes * address E721 with isintance() checks * fix bare excepts * precommit
10 lines
198 B
Python
10 lines
198 B
Python
import urllib.error
|
|
import urllib.request
|
|
|
|
try:
|
|
urllib.request.urlopen("https://www.google.com")
|
|
except urllib.error.URLError: # -no-cov-
|
|
HAS_INTERNET = False
|
|
else:
|
|
HAS_INTERNET = True
|