diff --git a/__pycache__/cls_mth_fc.cpython-312.pyc b/__pycache__/cls_mth_fc.cpython-312.pyc index 0729fdf..3e4e606 100644 Binary files a/__pycache__/cls_mth_fc.cpython-312.pyc and b/__pycache__/cls_mth_fc.cpython-312.pyc differ diff --git a/cls_mth_fc.py b/cls_mth_fc.py index 212465c..4c02937 100755 --- a/cls_mth_fc.py +++ b/cls_mth_fc.py @@ -97,7 +97,8 @@ class Create: process = subprocess.run( ["pkexec", "/usr/local/bin/ssl_decrypt.py"], stdout=subprocess.PIPE, - text=True, check=True + text=True, + check=True, ) # print(process.stdout) if process.returncode == 0: @@ -113,7 +114,8 @@ class Create: process = subprocess.run( ["pkexec", "/usr/local/bin/ssl_encrypt.py"], stdout=subprocess.PIPE, - text=True, check=True + text=True, + check=True, ) print(process.stdout) if process.returncode == 0: @@ -125,7 +127,7 @@ class Create: def uos(): """ - uos = LOGIN USERNAME + uos = LOGIN USERNAME This method displays the user name of the logged-in user, even if you are rooted in a shell @@ -150,20 +152,22 @@ class GiteaUpdate: Example: version = 'v. 1.1.1.1' GiteaUpdate.api_down(http://example.de, version) """ try: - response = requests.get(update_api_url) + response = requests.get(update_api_url, timeout=10) response_dict = response.json() response_dict = response_dict[0] with open(wg_set, "r", encoding="utf-8") as set_file: set_file = set_file.read() if "on\n" in set_file: if version[3:] != response_dict["tag_name"]: - return response_dict["tag_name"] + req = response_dict["tag_name"] else: - return "No Updates" + req = "No Updates" else: - return "False" - except requests.exceptions.ConnectionError: - return "No Internet Connection!" + req = "False" + return req + except requests.exceptions.RequestException: + req = "No Internet Connection!" + return req @staticmethod def download(urld, down_ok_image, down_not_ok_image, res): @@ -380,6 +384,7 @@ def if_tip(path): with open(path, "r", encoding="utf-8") as set_file2: lines2 = set_file2.readlines() if "False\n" in lines2: - return False + tip = "False" else: - return True + tip = "True" + return tip