我为工作中的引擎构建了一个结帐系统。该计划的一部分是必须每天进行结帐。我创建了一个脚本,该脚本在当天未填写电子邮件时发送电子邮件。它运行良好,我每天晚上9点和10点触发它。现在,这些钻机有时会停运,并且在停工时不需要进行检查。我做到了,所以当他们停止使用钻机时,它就会反映在他们的每日记录中。
我以为我可以正常工作,但是我的第一个钻机停产了,但仍然发送了电子邮件。我认为具有条件条件IF的第三列中的值不是“服务中断”,它将继续,并且如果确实说“服务中断”,则会停止脚本。我的代码有什么错?
https://docs.google.com/spreadsheets/d/134DFqUNgUihWacm3hNd4B9Zqe-BYubYRXd-hh15fgK8/edit?usp=sharing
#...
with open('encrypted_data.bin','wb') as out_file:
recipient_key = RSA.import_key(
open('my_rsa_public.pem').read())
session_key = get_random_bytes(16)
cipher_rsa = pkcs1_OAEP.new(recipient_key)
out_file.write(cipher_rsa.encrypt(session_key))
cipher_aes = AES.new(session_key,AES.MODE_EAX)
data = b'blah blah bl'
ciphertext,tag = cipher_aes.encrypt_and_digest(data)
out_file.write(cipher_aes.nonce)
out_file.write(tag)
out_file.write(ciphertext)
#...