Update tmpo.py

adding a conditions for http code status check