diff options
author | Alex Gaynor <alex.gaynor@gmail.com> | 2017-12-03 20:28:11 -0600 |
---|---|---|
committer | Paul Kehrer <paul.l.kehrer@gmail.com> | 2017-12-04 10:28:11 +0800 |
commit | 6d45e5963114fa74193a3458ab42869e719f39f9 (patch) | |
tree | aabd10fb30f738728013afe97d4d66e1909367c3 | |
parent | 87dce3c31158501176a2bfa7f3cb7eff1c0d0e8e (diff) | |
download | py-bcrypt-git-6d45e5963114fa74193a3458ab42869e719f39f9.tar.gz |
put a stacklevel on this warning (#136)
-rw-r--r-- | src/bcrypt/__init__.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/bcrypt/__init__.py b/src/bcrypt/__init__.py index ed4d3da..5d47fa8 100644 --- a/src/bcrypt/__init__.py +++ b/src/bcrypt/__init__.py @@ -134,7 +134,9 @@ def kdf(password, salt, desired_key_bytes, rounds, ignore_few_rounds=False): "Warning: bcrypt.kdf() called with only {0} round(s). " "This few is not secure: the parameter is linear, like PBKDF2.") .format(rounds), - UserWarning) + UserWarning, + stacklevel=2, + ) key = _bcrypt.ffi.new("uint8_t[]", desired_key_bytes) res = _bcrypt.lib.bcrypt_pbkdf( |