mirror of
https://github.com/HorlogeSkynet/archey4
synced 2025-04-13 16:00:15 +02:00
Do not throw any error within a non-graphical env' (with WMCTRL present)
This commit is contained in:
parent
43ac29f5ac
commit
2ed6d5d1a5
4
archey
4
archey
@ -451,9 +451,9 @@ class WindowManager:
|
||||
wm = '∅'
|
||||
|
||||
try:
|
||||
wm = re.search('(?<=Name: ).*', check_output(['wmctrl', '-m']).decode()).group(0)
|
||||
wm = re.search('(?<=Name: ).*', check_output(['wmctrl', '-m'], stderr=DEVNULL).decode()).group(0)
|
||||
|
||||
except FileNotFoundError:
|
||||
except (FileNotFoundError, CalledProcessError):
|
||||
for key in wmDict.keys():
|
||||
if key in processes:
|
||||
wm = wmDict[key]
|
||||
|
Loading…
x
Reference in New Issue
Block a user