diff options
author | Johannes Löthberg <johannes@kyriasis.com> | 2017-11-20 12:08:00 +0100 |
---|---|---|
committer | Johannes Löthberg <johannes@kyriasis.com> | 2017-11-20 12:08:00 +0100 |
commit | 7ab5c59779b08bc319f24b0903019b83829a04e8 (patch) | |
tree | cb7fcaeda2becaa9150eee9a51cfeb2f2941dd92 | |
parent | cc2a8492588643d176861b48875e0f79503fdafb (diff) | |
download | dotfiles-7ab5c59779b08bc319f24b0903019b83829a04e8.tar.xz |
weechat/python/notify: Don't try/except subprocess
Signed-off-by: Johannes Löthberg <johannes@kyriasis.com>
-rw-r--r-- | weechat/python/notify.py | 8 |
1 files changed, 2 insertions, 6 deletions
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 |