Skip to content
Snippets Groups Projects
Commit 3c537e7b authored by Martin Högstedt's avatar Martin Högstedt
Browse files

fixed merge comments

parent 126cfecc
No related branches found
No related tags found
1 merge request!24Fixed save_state_to_file
Pipeline #132139 failed
......@@ -123,7 +123,7 @@ class Module:
----------
file_path : str
Path to file to save to.
content : str
content : str
Content to save to file.
Returns
......@@ -133,7 +133,6 @@ class Module:
try:
with open(file_path, "a") as file:
file.write(content)
file.close()
except OSError:
return False
return True
......
......@@ -56,6 +56,8 @@ class Demux(Module):
def update_logic(self):
"""
Do nothing.
The demux has no logic
"""
pass
......@@ -72,10 +74,8 @@ class Demux(Module):
return state
def save_state_to_file(self, file_path: str) -> bool:
"""
The demux has no state to save.
"""
return True
content = self.name + ":\nvalue: " + str(self.value) + "\n\n"
return super()._helper_save_state_to_file(file_path, content)
def set_state(self, state: dict) -> None:
"""
......
......@@ -57,6 +57,8 @@ class Mux(Module):
def update_logic(self):
"""
Do nothing.
The mux has no logic.
"""
pass
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment