mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
Replace exceptions with 'if' statement
This commit is contained in:
parent
64e68706ad
commit
ec425501cd
@ -220,9 +220,9 @@ class IadsNetwork:
|
|||||||
f"IADS: No ground object found for {element_name}."
|
f"IADS: No ground object found for {element_name}."
|
||||||
f" This can be normal behaviour."
|
f" This can be normal behaviour."
|
||||||
)
|
)
|
||||||
try:
|
if element_name in self.ground_objects:
|
||||||
node = self.node_for_tgo(self.ground_objects[element_name])
|
node = self.node_for_tgo(self.ground_objects[element_name])
|
||||||
except KeyError:
|
else:
|
||||||
node = None
|
node = None
|
||||||
warning_msg = (
|
warning_msg = (
|
||||||
f"IADS: No ground object found for connection {element_name}"
|
f"IADS: No ground object found for connection {element_name}"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user