def exit_on_keyboard_interrupt(f):
@wraps(f)<EOL>def wrapper(*args, **kwargs):<EOL><INDENT>raise_exception = kwargs.pop('<STR_LIT>', False)<EOL>try:<EOL><INDENT>return f(*args, **kwargs)<EOL><DEDENT>except KeyboardInterrupt:<EOL><INDENT>if not raise_exception:<EOL><INDENT>sys.exit()<EOL><DEDENT>raise KeyboardInterrupt<EOL><DEDENT><DEDENT>return wrapper<EOL>
Decorator that allows user to exit script by sending a keyboard interrupt
    (ctrl + c) without raising an exception.