diff --git a/sendmsg.py b/sendmsg.py index 10c454c..cf52615 100644 --- a/sendmsg.py +++ b/sendmsg.py @@ -90,8 +90,7 @@ def send_daily_message(count): print(f"找到了{format}格式的图片文件!") break - if file_path: - if os.path.isfile(file_path): + if file_path and os.path.isfile(file_path): logger.info("找到了指定文件!") logger.info(f"文件大小: {os.path.getsize(file_path)} 字节")