Python 3 changes for ringogw.py