Update exception.py

format code