mirror of
https://github.com/craigerl/aprsd.git
synced 2026-06-16 21:08:36 -04:00
Account for required option
This patch accounts for a required config option in the process_standard_options_no_config decorator
This commit is contained in:
@@ -282,6 +282,10 @@ def process_standard_options_no_config(f: F) -> F:
|
||||
except cfg.ConfigFilesNotFoundError:
|
||||
# Config file not needed for this function, so ignore error
|
||||
pass
|
||||
except cfg.RequiredOptError as roe:
|
||||
# They are missing a required option from the config,
|
||||
# but we don't care, because they aren't loading a config
|
||||
pass
|
||||
|
||||
ctx.obj['loglevel'] = kwargs['loglevel']
|
||||
ctx.obj['config_file'] = kwargs['config_file']
|
||||
|
||||
Reference in New Issue
Block a user