diff --git a/cbpi/cli.py b/cbpi/cli.py index 850b53a..0698462 100644 --- a/cbpi/cli.py +++ b/cbpi/cli.py @@ -175,7 +175,7 @@ def check_for_setup(): zip.extractall(output_path) zip.close() if system != "Windows": - print("Changing owner and group of config folder recursively to {}:{}".format(owner,group)) + print(f"Changing owner and group of config folder recursively to {owner}:{group}") recursive_chown(output_path, owner, group) print("Removing backup file") os.remove(backupfile) diff --git a/cbpi/controller/fermentation_controller.py b/cbpi/controller/fermentation_controller.py index 1e2b3c6..8a749d4 100644 --- a/cbpi/controller/fermentation_controller.py +++ b/cbpi/controller/fermentation_controller.py @@ -95,7 +95,7 @@ class FermentationController: self.cbpi = cbpi self.logger = logging.getLogger(__name__) self.path = os.path.join(".", 'config', "fermenter_data.json") - self._loop = asyncio.get_event_loop() + self.data = [] self.types = {} self.steptypes = {} @@ -472,7 +472,7 @@ class FermentationController: await item.instance.start() item.instance.running = True - item.instance.task = self._loop.create_task(item.instance._run()) + item.instance.task = asyncio.get_event_loop().create_task(item.instance._run()) logging.info("{} started {}".format(item.name, id)) diff --git a/cbpi/craftbeerpi.py b/cbpi/craftbeerpi.py index fbbde3f..41ad6b3 100644 --- a/cbpi/craftbeerpi.py +++ b/cbpi/craftbeerpi.py @@ -88,7 +88,6 @@ class CraftBeerPi: self.static_config = load_config(os.path.join(".", 'config', "config.yaml")) - self.database_file = os.path.join(".", 'config', "craftbeerpi.db") logger.info("Init CraftBeerPI") policy = auth.SessionTktAuthentication(urandom(32), 60, include_ip=True)