Skip to content

Commit

Permalink
#416 handle case when xdg-utils is not installed for log folder opening
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonSAMPERE committed Jun 20, 2022
1 parent 7aec50e commit 0f384c7
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions modules/tools.py
Expand Up @@ -190,9 +190,13 @@ def open_dir_file(self, target):
proc = startfile(path.realpath(target))

elif opersys.startswith("linux"): # Linux:
proc = subprocess.Popen(
["xdg-open", target], stdout=subprocess.PIPE, stderr=subprocess.PIPE
)
try:
proc = subprocess.Popen(
["xdg-open", target], stdout=subprocess.PIPE, stderr=subprocess.PIPE
)
except Exception as e:
logger.error("Unable to open log folder: {}".format(e))
raise SystemError("Unable to open log folder, please try to install xdg-utils with the following command: sudo apt install xdg-utils")

elif opersys == "darwin": # Mac:
proc = subprocess.Popen(
Expand Down

0 comments on commit 0f384c7

Please sign in to comment.