diff --git a/sarracenia/config.py b/sarracenia/config.py index 78a2a4179..9091db9e1 100755 --- a/sarracenia/config.py +++ b/sarracenia/config.py @@ -891,7 +891,12 @@ def _varsub(self, word): def _build_mask(self, option, arguments): """ return new entry to be appended to list of masks """ - regex = re.compile(arguments[0]) + try: + regex = re.compile(arguments[0]) + except: + logger.critical( f"invalid regular expression: {arguments[0]}, ignored." ) + return None + if len(arguments) > 1: fn = arguments[1] else: