compile.py: fix for Python 3 (exception).