@@ -38,14 +38,14 @@ def _read_xml(self):
38
38
self .providerVersion : str = self ._root .get ("providerVersion" , "" )
39
39
40
40
layers_collect = self ._scene .find ("Layers" )
41
- if layers_collect :
41
+ if layers_collect is not None :
42
42
self .layers : List ["Layer" ] = [Layer (xml_node = i ) for i in layers_collect .findall ("Layer" )]
43
43
else :
44
44
self .layers = []
45
45
46
46
aux_data_collect = self ._scene .find ("AUXData" )
47
47
48
- if aux_data_collect :
48
+ if aux_data_collect is not None :
49
49
self .aux_data = AUXData (xml_node = aux_data_collect )
50
50
else :
51
51
self .aux_data = None
@@ -172,7 +172,7 @@ def _read_xml(self, xml_node: "Element"):
172
172
if xml_node .find ("FixtureID" ) is not None :
173
173
self .fixture_id = xml_node .find ("FixtureID" ).text
174
174
175
- if xml_node .find ("FixtureIDNumeric" ):
175
+ if xml_node .find ("FixtureIDNumeric" ) is not None :
176
176
self .fixture_id_numeric = int (xml_node .find ("FixtureIDNumeric" ).text )
177
177
if xml_node .find ("UnitNumber" ) is not None :
178
178
self .unit_number = int (xml_node .find ("UnitNumber" ).text )
@@ -198,7 +198,7 @@ def _read_xml(self, xml_node: "Element"):
198
198
self .alignments = [Alignment (xml_node = i ) for i in xml_node .find ("Alignments" ).findall ("Alignment" )]
199
199
if xml_node .find ("Connections" ):
200
200
self .connections = [Connection (xml_node = i ) for i in xml_node .find ("Connections" ).findall ("Connection" )]
201
- if xml_node .find ("CustomCommands" ):
201
+ if xml_node .find ("CustomCommands" ) is not None :
202
202
self .custom_commands = [CustomCommand (xml_node = i ) for i in xml_node .find ("CustomCommands" ).findall ("CustomCommand" )]
203
203
if xml_node .find ("Overwrites" ):
204
204
self .overwrites = [Overwrite (xml_node = i ) for i in xml_node .find ("Overwrites" ).findall ("Overwrite" )]
@@ -367,7 +367,7 @@ def _read_xml(self, xml_node: "Element"):
367
367
368
368
if xml_node .find ("Protocols" ):
369
369
self .protocols = [Protocol (xml_node = i ) for i in xml_node .find ("Protocols" ).findall ("Protocol" )]
370
- if xml_node .find ("Mappings" ):
370
+ if xml_node .find ("Mappings" ) is not None :
371
371
self .mappings = [Mapping (xml_node = i ) for i in xml_node .find ("Mappings" ).findall ("Mapping" )]
372
372
if xml_node .find ("Gobo" ) is not None :
373
373
self .gobo = Gobo (xml_node .attrib .get ("Gobo" ))
@@ -665,7 +665,7 @@ def _read_xml(self, xml_node: "Element"):
665
665
666
666
self .symbol = [Symbol (xml_node = i ) for i in xml_node .findall ("Symbol" )]
667
667
_geometry3d = [Geometry3D (xml_node = i ) for i in xml_node .findall ("Geometry3D" )]
668
- if xml_node .find ("ChildList" ):
668
+ if xml_node .find ("ChildList" ) is not None :
669
669
child_list = xml_node .find ("ChildList" )
670
670
671
671
symbols = [Symbol (xml_node = i ) for i in child_list .findall ("Symbol" )]
0 commit comments