Skip to content

Commit 82e4d33

Browse files
author
Tony Crisci
committed
be lenient with floating_nodes not being there
1 parent 63dd725 commit 82e4d33

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

i3ipc/i3ipc.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -852,12 +852,14 @@ def __init__(self, data, parent, conn):
852852

853853
# set complex properties
854854
self.nodes = []
855-
for n in data['nodes']:
856-
self.nodes.append(Con(n, self, conn))
855+
if 'nodes' in data:
856+
for n in data['nodes']:
857+
self.nodes.append(Con(n, self, conn))
857858

858859
self.floating_nodes = []
859-
for n in data['floating_nodes']:
860-
self.floating_nodes.append(Con(n, self, conn))
860+
if 'floating_nodes' in data:
861+
for n in data['floating_nodes']:
862+
self.floating_nodes.append(Con(n, self, conn))
861863

862864
self.window_class = None
863865
self.window_instance = None

0 commit comments

Comments
 (0)