Problem decrypting PGP in python with pyme without user interaction

爱⌒轻易说出口 提交于 2019-12-04 20:45:00

apparently, you need to interpret the keyword hook:

   def Callback( x, y, z, hook=None):
   ...

works perfectly well.

I'm able to reproduce the error you're reporting by returning None from the passphrase callback. Python functions return None by default if they reach the end of executing a function without reaching a return statement. Is it possible that you are accidentally returning None from your callback, perhaps due to misindentation of your code ending your function early? (The misindentation idea is just a guess based on the illegal indentation in your example.)

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!