minor fix
This commit is contained in:
@@ -43,12 +43,12 @@ def main():
|
||||
workbook = pandas.read_excel(args.input)
|
||||
data = workbook.where(pandas.notnull(workbook), None).to_dict(orient='list')
|
||||
recipients = data.get(args.column_address, [])
|
||||
codes = data.get(args.column_code, [])
|
||||
except Exception as e:
|
||||
print(f'[!!!!] 读取数据表失败:{e}')
|
||||
return 1
|
||||
|
||||
limit = len(recipients)
|
||||
codes = data.setdefault(args.column_code, [None] * limit)
|
||||
sents = data.setdefault(args.column_sent, [None] * limit)
|
||||
|
||||
print(f'[信息] 已读取联系人信息共 {limit} 条')
|
||||
@@ -171,7 +171,9 @@ def main():
|
||||
while active and index < limit:
|
||||
recipient = recipients[index]
|
||||
code = codes[index]
|
||||
occurrence = occurrences.setdefault(code, [0])
|
||||
|
||||
if not code: occurrence = [0]
|
||||
else: occurrence = occurrences.setdefault(code, [0])
|
||||
|
||||
current = index
|
||||
index += 1
|
||||
|
||||
Reference in New Issue
Block a user