diff options
author | Hynek Schlawack <hs@ox.cx> | 2016-11-18 14:55:06 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-11-18 14:55:06 +0100 |
commit | 33675f90f18cb8e926fccb13a1e60e900d56f7ff (patch) | |
tree | 62f1c7fc075d2c1fc2f989ef5df337e898a8e458 | |
parent | c60770699be48e9c3f3b4f542c8a4118be2936ab (diff) | |
download | pyopenssl-git-33675f90f18cb8e926fccb13a1e60e900d56f7ff.tar.gz |
Clarify error message (#573)
-rw-r--r-- | src/OpenSSL/crypto.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/OpenSSL/crypto.py b/src/OpenSSL/crypto.py index e1558ed..79440d7 100644 --- a/src/OpenSSL/crypto.py +++ b/src/OpenSSL/crypto.py @@ -2477,7 +2477,9 @@ class _PassphraseHelper(object): elif callable(self._passphrase): return _ffi.callback("pem_password_cb", self._read_passphrase) else: - raise TypeError("Last argument must be string or callable") + raise TypeError( + "Last argument must be a byte string or a callable." + ) @property def callback_args(self): @@ -2488,7 +2490,9 @@ class _PassphraseHelper(object): elif callable(self._passphrase): return _ffi.NULL else: - raise TypeError("Last argument must be string or callable") + raise TypeError( + "Last argument must be a byte string or a callable." + ) def raise_if_problem(self, exceptionType=Error): try: |