Merge pull request #143 from matbme/skip-conn

Skip connectivity check on env variable
main
Mateus B. Melchiades 2 years ago committed by GitHub
commit 6800097299
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -16,6 +16,7 @@
from urllib.request import urlopen
from urllib.error import URLError
import os
from gi.repository import Gtk, GLib, Adw
@ -51,6 +52,9 @@ class VanillaDefaultConnCheck(Adw.Bin):
def __start_conn_check(self):
def async_fn():
if "VANILLA_SKIP_CONN_CHECK" in os.environ:
return True
try:
urlopen("http://google.com", timeout=1)
return True

Loading…
Cancel
Save