upload_5.py 319 B

12345678910
  1. def decrypt(filename):
  2. with open(log_dir + filename, 'rb') as f:
  3. status = gpg.decrypt_file(f, output=log_dir + filename + '-decrypted')
  4. print('ok: ', status.ok)
  5. print('status: ', status.status)
  6. print('stderr: ', status.stderr)
  7. if status.ok:
  8. return True
  9. else:
  10. return False