From 7ab5c59779b08bc319f24b0903019b83829a04e8 Mon Sep 17 00:00:00 2001 From: Johannes Löthberg Date: Mon, 20 Nov 2017 12:08:00 +0100 Subject: weechat/python/notify: Don't try/except subprocess MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Johannes Löthberg --- weechat/python/notify.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'weechat') diff --git a/weechat/python/notify.py b/weechat/python/notify.py index c90b253..ad8882c 100644 --- a/weechat/python/notify.py +++ b/weechat/python/notify.py @@ -80,12 +80,8 @@ urgencies = { # Functions def is_active_window(): - try: - p = subprocess.Popen(['xdotool', 'getwindowfocus', 'getwindowname'], stdout=subprocess.PIPE) - (stdout, _) = p.communicate() - except FileNotFoundError: - # Always notify if xdotool isn't available. - return True + p = subprocess.Popen(['xdotool', 'getwindowfocus', 'getwindowname'], stdout=subprocess.PIPE) + (stdout, _) = p.communicate() if p.returncode != 0: return True -- cgit v1.2.3-70-g09d2