Merge pull request #1914 from Aurze/fix-1875

Fix for i3 if you have i3-py and i3ipc install
This commit is contained in:
Nikolai Aleksandrovich Pavlov 2018-05-30 09:43:18 +03:00 committed by GitHub
commit e3c34e7136
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 3 deletions

View File

@ -25,12 +25,13 @@ def i3_subscribe(conn, event, callback):
Function to run on event.
'''
try:
import i3
import i3ipc
except ImportError:
pass
else:
import i3
conn.Subscription(callback, event)
return
else:
pass
conn.on(event, callback)