aboutsummaryrefslogtreecommitdiffstats
path: root/weechat/python
diff options
context:
space:
mode:
authorJohannes Löthberg <johannes@kyriasis.com>2017-11-20 12:08:00 +0100
committerJohannes Löthberg <johannes@kyriasis.com>2017-11-20 12:08:00 +0100
commit7ab5c59779b08bc319f24b0903019b83829a04e8 (patch)
treecb7fcaeda2becaa9150eee9a51cfeb2f2941dd92 /weechat/python
parentcc2a8492588643d176861b48875e0f79503fdafb (diff)
downloaddotfiles-7ab5c59779b08bc319f24b0903019b83829a04e8.tar.xz
weechat/python/notify: Don't try/except subprocess
Signed-off-by: Johannes Löthberg <johannes@kyriasis.com>
Diffstat (limited to 'weechat/python')
-rw-r--r--weechat/python/notify.py8
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