Update client.py

Python 2.4+ compatabilty fix