use Path.home()

This commit is contained in:
2025-04-11 22:51:13 +02:00
parent 58b7445a6a
commit ffbb2f8583
+3 -1
View File
@@ -1,4 +1,5 @@
import os
from pathlib import Path
from src.db.mongo_manager import MONGO_STORE_MANAGER
from src.utils.excel_reader import read_contacts
@@ -20,7 +21,8 @@ def check_email_existence(file_path, mail_list):
if __name__ == '__main__':
mail_list = MONGO_STORE_MANAGER.get_destination_emails()
_folder_path = "/Users/panlei/Desktop/to_check"
_home = str(Path.home())
_folder_path = _home + "/Desktop/to_check"
# get files of a folder
for file in os.listdir(_folder_path):
if file.endswith(".xlsx"):