fixed issue when sorting hook when saving to xml, due to enum refactoring, updated test case to hit this potential issue in the future
This commit is contained in:
parent
3fac6bc7ec
commit
124d655dc6
2 changed files with 7 additions and 2 deletions
|
@ -312,7 +312,7 @@ class CoreXmlWriter:
|
|||
def write_session_hooks(self) -> None:
|
||||
# hook scripts
|
||||
hooks = etree.Element("session_hooks")
|
||||
for state in sorted(self.session._hooks.keys()):
|
||||
for state in sorted(self.session._hooks, key=lambda x: x.value):
|
||||
for file_name, data in self.session._hooks[state]:
|
||||
hook = etree.SubElement(hooks, "hook")
|
||||
add_attribute(hook, "name", file_name)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue