Signed-off-by: Jeroen Oudshoorn <oudshoorn.jeroen@gmail.com>
This commit is contained in:
Jeroen Oudshoorn
2023-09-18 09:21:24 +02:00
parent 833e298063
commit 8e509d9601

View File

@ -40,7 +40,7 @@ class InternetConnectionPlugin(plugins.Plugin):
# use the 'ping' command to check if we can reach a well-known website # use the 'ping' command to check if we can reach a well-known website
output = subprocess.check_output(['ping', '-c', '1', 'google.com']) output = subprocess.check_output(['ping', '-c', '1', 'google.com'])
# if the command was successful, it means there is an active Internet connection # if the command was successful, it means there is an active Internet connection
ui.set('connection_status', ' connected') ui.set('connection_status', 'connected')
except subprocess.CalledProcessError: except subprocess.CalledProcessError:
# if the command failed, it means there is no active Internet connection # if the command failed, it means there is no active Internet connection
ui.set('connection_status', ' disconnected') ui.set('connection_status', 'disconnected')