Fix store and database config option names
This commit is contained in:
parent
ec25fead72
commit
95aa7943c1
2 changed files with 10 additions and 10 deletions
|
@ -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
|
||||
|
|
|
@ -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,
|
||||
)
|
||||
|
||||
|
|
Loading…
Reference in a new issue