Since making BSLint use the multiprocessing library (to implement the spinner), keyboard interrupts are no longer handled cleanly. Instead, a long stacktrace is now printed out. See example below:
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/multiprocessing/popen_fork.py", line 29, in poll
pid, sts = os.waitpid(self.pid, flag)
KeyboardInterrupt
Process InterfaceHandler-1:
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/multiprocessing/process.py", line 249, in _bootstrap
self.run()
File "/Users/jin05/Documents/bslint/venv/lib/python3.5/site-packages/bslint/interface_handler.py", line 48, in run
self.lint()
File "/Users/jin05/Documents/bslint/venv/lib/python3.5/site-packages/bslint/interface_handler.py", line 61, in lint
self.lint_all(pathname)
File "/Users/jin05/Documents/bslint/venv/lib/python3.5/site-packages/bslint/interface_handler.py", line 107, in lint_all
self.lint_directory(dir_name, files)
File "/Users/jin05/Documents/bslint/venv/lib/python3.5/site-packages/bslint/interface_handler.py", line 112, in lint_directory
self.lint_file(filepath)
File "/Users/jin05/Documents/bslint/venv/lib/python3.5/site-packages/bslint/interface_handler.py", line 122, in lint_file
lex_result = Parser().parse(file_content)
File "/Users/jin05/Documents/bslint/venv/lib/python3.5/site-packages/bslint/parser/parser.py", line 44, in parse
self.check_statement_validity(self.tokens[self.current_token_index:])
File "/Users/jin05/Documents/bslint/venv/lib/python3.5/site-packages/bslint/parser/parser.py", line 59, in check_statement_validity
self.handle_statement()
File "/Users/jin05/Documents/bslint/venv/lib/python3.5/site-packages/bslint/parser/parser.py", line 71, in handle_statement
self.iterate_over_inner_statement()
File "/Users/jin05/Documents/bslint/venv/lib/python3.5/site-packages/bslint/parser/parser.py", line 99, in iterate_over_inner_statement
self.iterate_over_stmt()
File "/Users/jin05/Documents/bslint/venv/lib/python3.5/site-packages/bslint/parser/parser.py", line 112, in iterate_over_stmt
self.reduce_and_handle_error()
File "/Users/jin05/Documents/bslint/venv/lib/python3.5/site-packages/bslint/parser/parser.py", line 148, in reduce_and_handle_error
self.reduce_and_handle_error()
File "/Users/jin05/Documents/bslint/venv/lib/python3.5/site-packages/bslint/parser/parser.py", line 139, in reduce_and_handle_error
possible_production_rules = self._get_possible_production_rules(self.current_statement[-(index + 1)])
File "/Users/jin05/Documents/bslint/venv/lib/python3.5/site-packages/bslint/parser/parser.py", line 195, in _get_possible_production_rules
if current_token not in self.current_grammar.RULES[self.current_priority_level]:
KeyboardInterrupt
Since making BSLint use the multiprocessing library (to implement the spinner), keyboard interrupts are no longer handled cleanly. Instead, a long stacktrace is now printed out. See example below: