Skip to content

Commit

Permalink
Suppress xdotool version output
Browse files Browse the repository at this point in the history
  • Loading branch information
firecat53 committed Dec 12, 2021
1 parent eddb2f7 commit 9635e9f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions keepmenu/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import locale
import os
import shlex
from subprocess import call
from subprocess import run, DEVNULL
import sys
from os.path import exists, expanduser

Expand Down Expand Up @@ -87,14 +87,14 @@ def reload_config(): # pylint: disable=too-many-statements,too-many-branches
if CONF.has_option("database", "type_library"):
if CONF.get("database", "type_library") == "xdotool":
try:
call(['xdotool', 'version'])
run(['xdotool', 'version'], check=False, stdout=DEVNULL)
except OSError:
dmenu_err("Xdotool not installed.\n"
"Please install or remove that option from config.ini")
sys.exit()
elif CONF.get("database", "type_library") == "ydotool":
try:
call(['ydotool'])
run(['ydotool'], check=False, stdout=DEVNULL)
except OSError:
dmenu_err("Ydotool not installed.\n"
"Please install or remove that option from config.ini")
Expand Down

0 comments on commit 9635e9f

Please sign in to comment.