Update galerts.py

Porting to python 3 needs to be tested.