25
25
26
26
logger = logging .getLogger (__name__ )
27
27
28
+
28
29
class _AIOPubSub (PubSub ):
29
30
def queue_handler (self , handler , data = None ):
30
31
conn = self .conn
@@ -203,7 +204,6 @@ def exists(path):
203
204
socket_path = prop .value .decode ()
204
205
except DisplayError as e :
205
206
logger .info ('could not get i3 socket path from root atom' , exc_info = e )
206
- pass
207
207
208
208
if socket_path :
209
209
logger .info ('got socket path from root atom: %s' , socket_path )
@@ -222,12 +222,13 @@ def exists(path):
222
222
223
223
if process .returncode == 0 and stdout :
224
224
socket_path = stdout .decode ().strip ()
225
- if socket_path :
226
- logger .info ('got socket path from `%s` binary: %s' , binary , socket_path )
227
- if exists (socket_path ):
228
- return socket_path
225
+ logger .info ('got socket path from `%s` binary: %s' , binary , socket_path )
226
+ if exists (socket_path ):
227
+ return socket_path
229
228
else :
230
- logger .info ('could not get socket path from `%s` binary: returncode=%d, stdout=%s, stderr=%s' , process .returncode , stdout , stderr )
229
+ logger .info (
230
+ 'could not get socket path from `%s` binary: returncode=%d, stdout=%s, stderr=%s' ,
231
+ process .returncode , stdout , stderr )
231
232
232
233
except Exception as e :
233
234
logger .info ('could not get i3 socket path from `%s` binary' , binary , exc_info = e )
@@ -337,7 +338,8 @@ def _read_message(self):
337
338
return
338
339
339
340
event_type = EventType (1 << (event_type & 0x7f ))
340
- logger .info ('got message on subscription socket: type=%s, message=%s' , event_type , raw_message )
341
+ logger .info ('got message on subscription socket: type=%s, message=%s' , event_type ,
342
+ raw_message )
341
343
342
344
if event_type == EventType .WORKSPACE :
343
345
event = WorkspaceEvent (message , self , _Con = Con )
0 commit comments