upgrade.py now pep8 compliant