From e82354b3ab2edb4ab6f672584f5bac78bc45cccb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20=C5=BD=C3=A1=C4=8Dek?= Date: Wed, 8 Jun 2022 15:59:32 +0200 Subject: [PATCH] add operator to output file --- ucetnictvi_vfcz.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ucetnictvi_vfcz.py b/ucetnictvi_vfcz.py index d152425..b4d2263 100644 --- a/ucetnictvi_vfcz.py +++ b/ucetnictvi_vfcz.py @@ -155,7 +155,7 @@ print("Count of units: ", len(dictionary.keys())) with open('output_VFCZ_'+ext_date_from_filaname, 'w') as f: writer = csv.writer(f) - writer.writerow(["MSISDN","ICCID","IMSI","DATA-PRICE","DATA-AMOUNT","SMS-PRICE","SMS-COUNT","OTHER-PRICE","SIM-STATUS"]) + writer.writerow(["MSISDN","ICCID","IMSI","DATA-PRICE","DATA-AMOUNT","SMS-PRICE","SMS-COUNT","OTHER-PRICE","SIM-STATUS","OPERATOR"]) for key in dictionary.keys(): print(key) print(dictionary[key]) @@ -167,9 +167,9 @@ with open('output_VFCZ_'+ext_date_from_filaname, 'w') as f: - writer.writerow([key, "N/A", "N/A", round(float(data)), round(float(dataamount), 2), sms, smscount, other, "N/A"]) + writer.writerow([key, "N/A", "N/A", round(float(data)), round(float(dataamount), 2), sms, smscount, other, "N/A", "VFCZ"]) + -sys.exit() with open('output_VFCZ_'+ext_date_from_filaname, "rb") as f: webhook.add_file(file=f.read(), filename='output_VFCZ_'+ext_date_from_filaname)