def update_contact_photo(gd_client, contact_url): contact = gd_client.GetContact(contact_url) try: gd_client.DeletePhoto(contact) except gdata.client.RequestError, e: if e.status == 412: # Etags mismatch: handle the exception. pass