File tree Expand file tree Collapse file tree 2 files changed +11
-1
lines changed
Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Original file line number Diff line number Diff line change 1313
1414def url (global_config : GlobalConfig | None = None ) -> str :
1515 global_config = global_config or get_global_config ()
16+ if global_config .murfey_db_credentials is None :
17+ raise ValueError (
18+ "No database credentials file was provided for this instance of Murfey"
19+ )
1620 with open (global_config .murfey_db_credentials , "r" ) as stream :
1721 creds = yaml .safe_load (stream )
1822 f = Fernet (global_config .crypto_key .encode ("ascii" ))
Original file line number Diff line number Diff line change @@ -493,7 +493,13 @@ def machine_config_from_file(
493493
494494class GlobalConfig (BaseModel ):
495495 # Database connection settings
496- murfey_db_credentials : str
496+ murfey_db_credentials : Optional [Path ] = Field (
497+ default = None ,
498+ description = (
499+ "Full file path to where Murfey's SQL database credentials are stored. "
500+ "This is typically a YAML file."
501+ ),
502+ )
497503 sqlalchemy_pooling : bool = True
498504 crypto_key : str
499505
You can’t perform that action at this time.
0 commit comments