def return_false_on_exception(func):
@wraps(func)<EOL>def exceptfalse(*args, **kwargs):<EOL><INDENT>if not kwargs.pop('<STR_LIT>', False):<EOL><INDENT>try:<EOL><INDENT>return func(*args, **kwargs)<EOL><DEDENT>except Exception:<EOL><INDENT>return False<EOL><DEDENT><DEDENT>else:<EOL><INDENT>return func(*args, **kwargs)<EOL><DEDENT><DEDENT>return exceptfalse<EOL>
Decorator. When applied to a function, it will, by default, suppress any exceptions
raised by that function and return False. It may be overridden by passing a
"raise_exceptions" keyword argument when calling the wrapped function.