diff options
author | Alex Gaynor <alex.gaynor@gmail.com> | 2014-05-03 08:32:33 -0700 |
---|---|---|
committer | Alex Gaynor <alex.gaynor@gmail.com> | 2014-05-03 08:32:33 -0700 |
commit | 18e036d6230b63bddceadfe99d303bab6b14d266 (patch) | |
tree | 4aa2c67e2ad7b195d0899dd6354c3cf9f7faa7b9 | |
parent | bac18fcdbba52a7f2f9f73f43f4e2fcc6e84cdfb (diff) | |
download | cryptography-18e036d6230b63bddceadfe99d303bab6b14d266.tar.gz cryptography-18e036d6230b63bddceadfe99d303bab6b14d266.tar.bz2 cryptography-18e036d6230b63bddceadfe99d303bab6b14d266.zip |
Warn at the right stacklevel
-rw-r--r-- | cryptography/hazmat/primitives/asymmetric/padding.py | 6 |
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): |