1
0
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:
Samuel FORESTIER 2017-08-01 17:31:32 +02:00
parent 43ac29f5ac
commit 2ed6d5d1a5
No known key found for this signature in database
GPG Key ID: 4B6FA04B1AC95DD4

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]