mirror of
https://pagure.io/fm-orchestrator.git
synced 2026-04-05 11:48:33 +08:00
fix: helps identifying conf var name instead of generic TypeError
This commit is contained in:
@@ -229,7 +229,10 @@ class Config(object):
|
||||
# type conversion
|
||||
convert = self._defaults_by_name[key]['type']
|
||||
if convert in [bool, int, list, str]:
|
||||
setattr(self, key, convert(value))
|
||||
try:
|
||||
setattr(self, key, convert(value))
|
||||
except:
|
||||
raise Exception("Configuration value conversion failed for name: %s" % key)
|
||||
# conversion is not required if type is None
|
||||
elif convert is None:
|
||||
setattr(self, key, value)
|
||||
|
||||
Reference in New Issue
Block a user