aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Gaynor <alex.gaynor@gmail.com>2014-05-03 08:32:33 -0700
committerAlex Gaynor <alex.gaynor@gmail.com>2014-05-03 08:32:33 -0700
commit18e036d6230b63bddceadfe99d303bab6b14d266 (patch)
tree4aa2c67e2ad7b195d0899dd6354c3cf9f7faa7b9
parentbac18fcdbba52a7f2f9f73f43f4e2fcc6e84cdfb (diff)
downloadcryptography-18e036d6230b63bddceadfe99d303bab6b14d266.tar.gz
cryptography-18e036d6230b63bddceadfe99d303bab6b14d266.tar.bz2
cryptography-18e036d6230b63bddceadfe99d303bab6b14d266.zip
Warn at the right stacklevel
-rw-r--r--cryptography/hazmat/primitives/asymmetric/padding.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/cryptography/hazmat/primitives/asymmetric/padding.py b/cryptography/hazmat/primitives/asymmetric/padding.py
index dcc6fe06..f7710c49 100644
--- a/cryptography/hazmat/primitives/asymmetric/padding.py
+++ b/cryptography/hazmat/primitives/asymmetric/padding.py
@@ -38,7 +38,8 @@ class PSS(object):
warnings.warn(
"salt_length is deprecated on MGF1 and should be added via the"
" PSS constructor.",
- utils.DeprecatedIn04
+ utils.DeprecatedIn04,
+ stacklevel=2
)
else:
if (not isinstance(salt_length, six.integer_types) and
@@ -80,7 +81,8 @@ class MGF1(object):
warnings.warn(
"salt_length is deprecated on MGF1 and should be passed to "
"the PSS constructor instead.",
- utils.DeprecatedIn04
+ utils.DeprecatedIn04,
+ stacklevel=2
)
if (not isinstance(salt_length, six.integer_types) and
salt_length is not self.MAX_LENGTH):