File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change 5353
5454setup_penv_minimal = penv_setup_module .setup_penv_minimal
5555get_executable_path = penv_setup_module .get_executable_path
56+ has_internet_connection = penv_setup_module .has_internet_connection
5657
5758
5859# Constants
121122logger = logging .getLogger (__name__ )
122123
123124def is_internet_available ():
124- """Check if connected to Internet"""
125- try :
126- with socket .create_connection (("8.8.8.8" , 53 ), timeout = 3 ):
127- return True
128- except OSError :
129- return False
125+ """
126+ Check if connected to Internet.
127+ Uses the centralized internet check from penv_setup module.
128+ """
129+ return has_internet_connection ()
130130
131131def safe_file_operation (operation_func ):
132132 """Decorator for safe filesystem operations with error handling."""
You can’t perform that action at this time.
0 commit comments