Fix if you have i3ipc and i3 on your system. Will prioritize i3ipc

This commit is contained in:
Aurze 2018-05-29 23:18:02 -04:00
parent a5dd717ac4
commit 1da9485f5f
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)