diff --git a/my_project_name/config.py b/my_project_name/config.py index 1def0d2..cb5a95c 100644 --- a/my_project_name/config.py +++ b/my_project_name/config.py @@ -52,17 +52,17 @@ class Config(object): logger.addHandler(handler) # Storage setup - self.store_filepath = self._get_cfg( - ["storage", "store_filepath"], required=True + self.store_path = self._get_cfg( + ["storage", "store_path"], required=True ) # Create the store folder if it doesn't exist - if not os.path.isdir(self.store_filepath): - if not os.path.exists(self.store_filepath): - os.mkdir(self.store_filepath) + if not os.path.isdir(self.store_path): + if not os.path.exists(self.store_path): + os.mkdir(self.store_path) else: raise ConfigError( - f"storage.store_filepath '{self.store_filepath}' is not a directory" + f"storage.store_path '{self.store_path}' is not a directory" ) # Database setup diff --git a/my_project_name/main.py b/my_project_name/main.py index 59141c9..444d569 100644 --- a/my_project_name/main.py +++ b/my_project_name/main.py @@ -26,10 +26,10 @@ async def main(): # A different config file path can be specified as the first command line argument if len(sys.argv) > 1: - config_filepath = sys.argv[1] + config_path = sys.argv[1] else: - config_filepath = "config.yaml" - config = Config(config_filepath) + config_path = "config.yaml" + config = Config(config_path) # Configure the database store = Storage(config) @@ -47,7 +47,7 @@ async def main(): config.homeserver_url, config.user_id, device_id=config.device_id, - store_path=config.store_filepath, + store_path=config.store_path, config=client_config, )