diff --git a/setuptools/config/setupcfg.py b/setuptools/config/setupcfg.py index b172b94694..835d731483 100644 --- a/setuptools/config/setupcfg.py +++ b/setuptools/config/setupcfg.py @@ -293,18 +293,9 @@ def __setitem__(self, option_name, value): # Already inhabited. Skipping. return - skip_option = False - parser = self.parsers.get(option_name) - if parser: - try: - parsed = parser(value) - - except Exception: - skip_option = True - if not self.ignore_option_errors: - raise - - if skip_option: + try: + parsed = self.parsers.get(option_name, lambda x: x)(value) + except (Exception,) * self.ignore_option_errors: return setter = getattr(target_obj, 'set_%s' % option_name, None)