Update todo.py

Hotfix: Prevent the "referenced before assignment" in EmptyPage exceptions.