mirror of
https://github.com/dcs-liberation/dcs_liberation.git
synced 2025-11-10 14:22:26 +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" This can be normal behaviour."
|
||||
)
|
||||
try:
|
||||
if element_name in self.ground_objects:
|
||||
node = self.node_for_tgo(self.ground_objects[element_name])
|
||||
except KeyError:
|
||||
else:
|
||||
node = None
|
||||
warning_msg = (
|
||||
f"IADS: No ground object found for connection {element_name}"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user