From 5f398d57eada79cc34ab59574432c922980d265b Mon Sep 17 00:00:00 2001 From: Dict Xiong Date: Sun, 7 Aug 2022 14:27:58 +0800 Subject: [PATCH] bug fix --- tools/post-log.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tools/post-log.py b/tools/post-log.py index 4a187c2..3991fe7 100755 --- a/tools/post-log.py +++ b/tools/post-log.py @@ -51,6 +51,10 @@ if __name__ == "__main__": content = args.content hostname = get_hostname() uuid = get_uuid() + content=content.strip() + if not content: + print("error: empty log content") + exit(1) resp = post_log(url, hostname, uuid, content) if resp.status_code == 200: print("200 ok")