Skip to content
This repository was archived by the owner on Dec 22, 2023. It is now read-only.

Wifi speed excepetion handle and dependency version update #648

Merged
merged 3 commits into from
Jun 1, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions Scripts/Miscellaneous/Wifi_Speed/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ A simple Python script that uses 'speedtest' module to test the internet bandwid
### Prerequisites
You will need to install speedtest module.
The installation commands are provided in requirements.txt
```bash
pip install -r requirements.txt
```

### How to run the script
First you have to go to the Wifi_Speed directory. Run the following command once you are in project directory
Expand Down
2 changes: 1 addition & 1 deletion Scripts/Miscellaneous/Wifi_Speed/requirements.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
speedtest-cli==2.1.2
speedtest-cli==2.1.3
7 changes: 6 additions & 1 deletion Scripts/Miscellaneous/Wifi_Speed/wifiSpeed.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,14 @@

# Python module for testing internet bandwidth
import speedtest
from sys import exit

# Creating a instance
s = speedtest.Speedtest()
try:
s = speedtest.Speedtest()
except speedtest.ConfigRetrievalError:
print('Sorry, looks like you are not connected to any network!\nPlease make sure you are connected to the internet.')
exit()

# Menu
print("Select a valid option from below:\n")
Expand Down