daemon: Session cleanup, removed unused functions, used context managers for writing files, made variables used externally no longer private
This commit is contained in:
parent
178d12b327
commit
23d957679e
11 changed files with 99 additions and 220 deletions
|
@ -320,8 +320,8 @@ class CoreXmlWriter:
|
|||
def write_session_hooks(self) -> None:
|
||||
# hook scripts
|
||||
hooks = etree.Element("session_hooks")
|
||||
for state in sorted(self.session._hooks, key=lambda x: x.value):
|
||||
for file_name, data in self.session._hooks[state]:
|
||||
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)
|
||||
add_attribute(hook, "state", state.value)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue