Skip to content

Commit cf55812

Browse files
author
Tony Crisci
committed
return empty list instead of None on restart
This makes the type system a bit nicer. ref 9f671a1
1 parent 3b5e210 commit cf55812

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

i3ipc/i3ipc.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -504,14 +504,13 @@ def command(self, payload):
504504
``i3-msg`` or an ``exec`` block in your i3 config to control the
505505
window manager.
506506
507-
:rtype: List of :class:`CommandReply` or None if the command causes i3
508-
to restart or exit and does not give a reply.
507+
:rtype: List of :class:`CommandReply`.
509508
"""
510509
data = self.message(MessageType.COMMAND, payload)
511510
if data:
512511
return json.loads(data, object_hook=CommandReply)
513512
else:
514-
return None
513+
return []
515514

516515
def get_version(self):
517516
"""

0 commit comments

Comments
 (0)