Skip to content

Commit

Permalink
convert: Warn when alias cannot be added to import tree.
Browse files Browse the repository at this point in the history
  • Loading branch information
heinezen committed Dec 24, 2023
1 parent 9497144 commit a685935
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion openage/nyan/import_tree.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
from enum import Enum
import typing

from openage.log import warn

if typing.TYPE_CHECKING:
from openage.convert.entity_object.export.formats.nyan_file import NyanFile
from openage.nyan.nyan_structs import NyanObject
Expand Down Expand Up @@ -161,7 +163,9 @@ def add_alias(self, fqon: tuple[str], alias: str) -> None:
current_node = current_node.get_child(node_str)

except KeyError: # as err:
# TODO: Do not silently fail
# TODO: Fail when the fqon is not found in the tree
warn(f"fqon '{'.'.join(fqon)}' "
"could not be found in import tree")
return
# raise KeyError(f"fqon '{'.'.join(fqon)}' "
# "could not be found in import tree") from err
Expand Down

0 comments on commit a685935

Please sign in to comment.