Don't try to obtain config file unless keystore-filepath is not provided.

pull/3554/head
derekpierre 2024-08-15 08:46:38 -04:00
parent 8ef133be9f
commit a985c91bd6
No known key found for this signature in database
1 changed files with 7 additions and 5 deletions

View File

@ -446,14 +446,16 @@ def audit(config_file, keystore_filepath, view_mnemonic):
),
)
config_file = config_file or DEFAULT_CONFIG_FILEPATH
if not config_file.exists():
emitter.error(f"Ursula configuration file not found - {config_file.resolve()}")
raise click.Abort()
if keystore_filepath:
keystore = Keystore(keystore_filepath)
else:
config_file = config_file or DEFAULT_CONFIG_FILEPATH
if not config_file.exists():
emitter.error(
f"Ursula configuration file not found - {config_file.resolve()}"
)
raise click.Abort()
ursula_config = UrsulaConfiguration.from_configuration_file(
filepath=config_file
)