From 6a026e4d5b9d8f1d1f42a53b16634dd124af9596 Mon Sep 17 00:00:00 2001 From: Filip Valder Date: Fri, 11 Nov 2016 14:24:55 +0100 Subject: [PATCH] fix: helps identifying conf var name instead of generic TypeError --- module_build_service/config.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/module_build_service/config.py b/module_build_service/config.py index 8d2faf67..3a5f86ce 100644 --- a/module_build_service/config.py +++ b/module_build_service/config.py @@ -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)