mirror of
https://github.com/DictXiong/dotfiles.git
synced 2024-11-24 12:27:01 +08:00
degrade log 403 to warning (#17)
This commit is contained in:
parent
83695d48fb
commit
9778c69d78
|
@ -63,11 +63,11 @@ if __name__ == "__main__":
|
||||||
logging.info("200 ok")
|
logging.info("200 ok")
|
||||||
exit(0)
|
exit(0)
|
||||||
elif resp.status_code == 403:
|
elif resp.status_code == 403:
|
||||||
logging.error("403 forbidden")
|
logging.warning("403 forbidden")
|
||||||
logging.info("you may need to register your hostname and uuid")
|
logging.info("you may need to register your hostname and uuid")
|
||||||
logging.info(f"hostname: {hostname}, uuid: {uuid}")
|
logging.info(f"hostname: {hostname}, uuid: {uuid}")
|
||||||
exit(0)
|
exit(0)
|
||||||
else:
|
else:
|
||||||
logging.critical("unknown error ")
|
logging.critical("unknown error")
|
||||||
logging.error(f"{resp.status_code}: {resp.text}")
|
logging.error(f"{resp.status_code}: {resp.text}")
|
||||||
exit(1)
|
exit(1)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user