mirror of
https://github.com/openSUSE/osc.git
synced 2024-11-10 06:46:15 +01:00
Merge pull request #1056 from dmach/fix-invalid-credentials-manager-traceback
Don't traceback on invalid credentials manager
This commit is contained in:
commit
e6061da1d6
@ -413,7 +413,12 @@ def create_credentials_manager(url, cp):
|
||||
creds_mgr_cls = config_entry
|
||||
options = None
|
||||
mod, cls = creds_mgr_cls.rsplit('.', 1)
|
||||
return getattr(importlib.import_module(mod), cls).create(cp, options)
|
||||
try:
|
||||
creds_mgr = getattr(importlib.import_module(mod), cls).create(cp, options)
|
||||
except ModuleNotFoundError:
|
||||
msg = "Invalid credentials_mgr_class: {}".format(creds_mgr_cls)
|
||||
raise oscerr.ConfigError(msg, conf.config['conffile'])
|
||||
return creds_mgr
|
||||
|
||||
|
||||
def qualified_name(obj):
|
||||
|
Loading…
Reference in New Issue
Block a user