From 8ad86bd937a7d6c21b4b88f5f39f93681ec20896 Mon Sep 17 00:00:00 2001 From: AdminWhaleFall Date: Wed, 27 Apr 2022 02:02:03 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9E=20fix:=20=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E4=BA=91=E5=87=BD=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- index.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/index.py b/index.py index f3d81aa..ff15692 100644 --- a/index.py +++ b/index.py @@ -3,11 +3,14 @@ import os from pathlib import Path -path = Path(__file__).parent.absolute() +path = os.path.join(os.getcwd(), "src") def main_handler(event, context): print("云函数执行中.....") - print(f"当前目录:{path}") + print(f"云函数路径:{path}") os.chdir(path) # 自定义命令 - os.system("python3 smsboom.py -p 19820294268 -t 16") \ No newline at end of file + os.system("python3 smsboom.py run -p 19820294268 -t 16") + +if __name__ == "__main__": + main_handler(1,2) \ No newline at end of file