diff --git a/__pycache__/cls_mth_fc.cpython-312.pyc b/__pycache__/cls_mth_fc.cpython-312.pyc index 75cd087..0729fdf 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 dceb4bf..212465c 100755 --- a/cls_mth_fc.py +++ b/cls_mth_fc.py @@ -97,7 +97,7 @@ class Create: process = subprocess.run( ["pkexec", "/usr/local/bin/ssl_decrypt.py"], stdout=subprocess.PIPE, - text=True, + text=True, check=True ) # print(process.stdout) if process.returncode == 0: @@ -113,7 +113,7 @@ class Create: process = subprocess.run( ["pkexec", "/usr/local/bin/ssl_encrypt.py"], stdout=subprocess.PIPE, - text=True, + text=True, check=True ) print(process.stdout) if process.returncode == 0: @@ -122,22 +122,18 @@ class Create: print(f"Error with the following code... {process.returncode}") -class UOS: - """ - The class is only for unixoidal systems "UOS" = UnixOS - +def uos(): """ - @staticmethod - def username(): - """ - This method displays the user name of the logged-in user, - even if you are rooted in a shell - """ - logname = str(Path.home())[6:] - file = Path.home() / "/tmp/.loguser" - with open(file, "w", encoding="utf-8") as f: - f.write(logname) + uos = LOGIN USERNAME + + This method displays the user name of the logged-in user, + even if you are rooted in a shell + """ + logname = str(Path.home())[6:] + file = Path.home() / "/tmp/.loguser" + with open(file, "w", encoding="utf-8") as f: + f.write(logname) class GiteaUpdate: @@ -377,20 +373,13 @@ class Tunnel: pass -class Tipi: +def if_tip(path): """ - Class for Tooltip setting write in File - Calling request path to file + method that writes in file whether tooltip is displayed or not """ - - @staticmethod - def if_tip(path): - """ - method that writes in file whether tooltip is displayed or not - """ - with open(path, "r", encoding="utf-8") as set_file2: - lines2 = set_file2.readlines() - if "False\n" in lines2: - return False - else: - return True + with open(path, "r", encoding="utf-8") as set_file2: + lines2 = set_file2.readlines() + if "False\n" in lines2: + return False + else: + return True diff --git a/wirepy.py b/wirepy.py index 756d743..5c7e611 100755 --- a/wirepy.py +++ b/wirepy.py @@ -12,16 +12,16 @@ import tkinter as tk from pathlib import Path from subprocess import check_call from tkinter import filedialog, ttk, TclError -from cls_mth_fc import Tunnel, Create, msg_window, Tipi, GiteaUpdate, UOS +from cls_mth_fc import Tunnel, Create, msg_window, if_tip, GiteaUpdate, uos -UOS.username() +uos() Create.dir_and_files() Create.make_dir() Create.decrypt() tcl_path = Path("/usr/share/TK-Themes") wg_set = Path(Path.home() / ".config/wire_py/settings") -wg_tips = Tipi.if_tip(wg_set) +wg_tips = if_tip(wg_set) dirname = Path("/tmp/tlecdcwg/") """ 1 = 1. Year, 09 = Month of the Year, 2924 = Day and Year of the Year """