From 125c9f848bb0312c29db64a13a3b6be2676d96d4 Mon Sep 17 00:00:00 2001 From: Lei PAN Date: Thu, 7 Apr 2022 23:47:05 +0200 Subject: [PATCH] set default excel file name --- utils/excel_reader.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/utils/excel_reader.py b/utils/excel_reader.py index 9ccad2e..5d39f80 100644 --- a/utils/excel_reader.py +++ b/utils/excel_reader.py @@ -36,8 +36,8 @@ class ExcelHelper: user_agents.append(user_agent) return user_agents - def read_contacts(self) -> list: - contact_list_in_json = pandas.read_excel(definitions.ROOT_DIR + "/contact.xlsx").to_json(orient='records') + def read_contacts(self,file_name="/contact.xlsx") -> list: + contact_list_in_json = pandas.read_excel(definitions.ROOT_DIR + file_name).to_json(orient='records') contact_dict_list = json.loads(contact_list_in_json) contact_list = [] for contact_dict in contact_dict_list: