From bbed4d9d1252b2579d6032ddd36a31fcd5fd6496 Mon Sep 17 00:00:00 2001 From: Lovi-0 Date: Sat, 20 Jul 2024 13:21:06 +0200 Subject: [PATCH] Fix ep < 10 and htt:\\google to https;\\google --- Src/Api/Template/Util/manage_ep.py | 2 +- Src/Util/os.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Src/Api/Template/Util/manage_ep.py b/Src/Api/Template/Util/manage_ep.py index c3c7bcd..fa4992c 100644 --- a/Src/Api/Template/Util/manage_ep.py +++ b/Src/Api/Template/Util/manage_ep.py @@ -27,7 +27,7 @@ def dynamic_format_number(n: int) -> str: Returns: - str: The formatted number as a string with a leading zero if the number is less than 9. """ - if n < 9: + if n < 10: width = len(str(n)) + 1 else: width = len(str(n)) diff --git a/Src/Util/os.py b/Src/Util/os.py index 4625769..5deddba 100644 --- a/Src/Util/os.py +++ b/Src/Util/os.py @@ -286,7 +286,7 @@ def check_internet(): while True: try: # Attempt to open a connection to a website to check for internet connection - urllib.request.urlopen("http://www.google.com", timeout=1) + urllib.request.urlopen("https://www.google.com", timeout=3) console.log("[bold green]Internet is available![/bold green]") break