Properly handle SystemExit exceptions
Fix flake8 warning
Merge pull request #121 from sbesson/system_exit

Handle SystemExit in main.py