Update client.py

Issue #440