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. Function to run on event.
''' '''
try: try:
import i3 import i3ipc
except ImportError: except ImportError:
pass import i3
else:
conn.Subscription(callback, event) conn.Subscription(callback, event)
return return
else:
pass
conn.on(event, callback) conn.on(event, callback)