Fix writing server info files on Python 2