Commit 47fcb6d1 authored by Manuel Christlieb's avatar Manuel Christlieb

fix: not position in statements

parent b9a16fe0
......@@ -7,7 +7,7 @@ import yaml
class StoredState:
def __init__(self, state):
self.state = state
if not self.state.stored_name is None:
if self.state.stored_name is not None:
raise RuntimeError('You may only store the state once')
self.file_handle = tempfile.NamedTemporaryFile(suffix='b5-state', mode='w', encoding='utf-8', delete=False)
......@@ -45,7 +45,7 @@ class State:
if not hasattr(self, key):
setattr(self, key, None)
for key in kwargs:
if not key in self.KEYS:
if key not in self.KEYS:
raise RuntimeError('Key %s is not a valid state attribute' % key)
setattr(self, key, kwargs[key])
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment