Make updates.py compatible with Python 3