aboutsummaryrefslogtreecommitdiffstats
path: root/python/test_gpg.py
diff options
context:
space:
mode:
Diffstat (limited to 'python/test_gpg.py')
-rw-r--r--python/test_gpg.py26
1 files changed, 0 insertions, 26 deletions
diff --git a/python/test_gpg.py b/python/test_gpg.py
deleted file mode 100644
index 6d8cdcd0..00000000
--- a/python/test_gpg.py
+++ /dev/null
@@ -1,26 +0,0 @@
-import gpg
-from serenitas.utils.exchange import ExchangeMessage
-import datetime
-
-em = ExchangeMessage()
-for msg in em.get_msgs(
- path=["SeleneOps", "Passport"],
- filters={"last_modification_time": datetime.date.today()},
-):
- print(msg)
- for attach in msg.attachments:
- if attach.name == "Attachment1.pgp":
- try:
- with attach.fp as fp:
- plaintext, result, verify_result = gpg.Context().decrypt(
- fp.read(), passphrase="Serenitas1"
- )
- with open(
- f"/home/serenitas/flint/{attach.last_modified_time.strftime('%Y%m%d')}_ISOSEL.csv",
- "w",
- ) as csvFile:
- text = plaintext.decode("utf-8").replace("\t", ",")
- csvFile.write(text)
- break
- except gpg.errors.GPGMEError as e:
- print(e)