浏览代码

Is cPickle haunting us again?

oz123 11 年之前
父节点
当前提交
aa3569bb85
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      pwman/util/crypto.py

+ 1 - 1
pwman/util/crypto.py

@@ -404,7 +404,7 @@ password again")
             # TODO: completely remove this block, and convert
             # the DB to a completely plain text ...
             return cPickle.loads(plaintext)
-        except (TypeError, ValueError, cPickle.UnpicklingError):
+        except (TypeError, ValueError, cPickle.UnpicklingError, EOFError):
             return plaintext