Skip to content

Commit f89b8dd

Browse files
author
Tony Crisci
committed
format aio connection
1 parent b63737a commit f89b8dd

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

i3ipc/aio/connection.py

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525

2626
logger = logging.getLogger(__name__)
2727

28+
2829
class _AIOPubSub(PubSub):
2930
def queue_handler(self, handler, data=None):
3031
conn = self.conn
@@ -203,7 +204,6 @@ def exists(path):
203204
socket_path = prop.value.decode()
204205
except DisplayError as e:
205206
logger.info('could not get i3 socket path from root atom', exc_info=e)
206-
pass
207207

208208
if socket_path:
209209
logger.info('got socket path from root atom: %s', socket_path)
@@ -222,12 +222,13 @@ def exists(path):
222222

223223
if process.returncode == 0 and stdout:
224224
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
229228
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)
231232

232233
except Exception as e:
233234
logger.info('could not get i3 socket path from `%s` binary', binary, exc_info=e)
@@ -337,7 +338,8 @@ def _read_message(self):
337338
return
338339

339340
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)
341343

342344
if event_type == EventType.WORKSPACE:
343345
event = WorkspaceEvent(message, self, _Con=Con)

0 commit comments

Comments
 (0)