daemon.py py3 compatibility

Change exception to new syntax