python, java: fixed CloudMe retry strategy