Fixed up main.py

* Cleaned up trailing whitespace
* Cleaned up a try catch to catch using a tuple