Skip to content

Commit

Permalink
Test
Browse files Browse the repository at this point in the history
  • Loading branch information
abelfodil committed Dec 9, 2024
1 parent e93c62a commit d2ee9c1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
logger = get_logger(__name__)

def _is_connected():
urlopen(Request("https://1.1.1.1", headers={"User-Agent": "randwall/1.0"}))
try:
urlopen(Request("https://1.1.1.1", headers={"User-Agent": "randwall/1.0"}))
return True
except:
logger.warning("Failed to connect to the internet.")
Expand Down

0 comments on commit d2ee9c1

Please sign in to comment.