From db22fbb61c239cefc4a206c2496b5e1872075e5a Mon Sep 17 00:00:00 2001 From: "Abhiraj Roy (iconized)" <157954129+iconized@users.noreply.github.com> Date: Thu, 25 Apr 2024 16:19:24 +0530 Subject: [PATCH] open_log_dir() --- blackbox/Functions.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/blackbox/Functions.py b/blackbox/Functions.py index b862159..ac7f457 100644 --- a/blackbox/Functions.py +++ b/blackbox/Functions.py @@ -2181,3 +2181,13 @@ def log_package_status(self): f.write("%s\n" % package) break +def open_log_dir(): + try: + subprocess.Popen( + ["sudo", "-u", sudo_username, "xdg-open", log_dir], + shell=False, + stdout=subprocess.PIPE, + stderr=subprocess.STDOUT, + ) + except Exception as e: + logger.error("Exception in open_log_dir(): %s" % e) \ No newline at end of file