diff options
author | Paul Kehrer <paul.l.kehrer@gmail.com> | 2014-05-03 12:52:06 -0500 |
---|---|---|
committer | Paul Kehrer <paul.l.kehrer@gmail.com> | 2014-05-03 12:52:06 -0500 |
commit | 1c851f63c55835961ce12d7d40131b45928761f1 (patch) | |
tree | 48c5e78e92d14ddca10f1c5e33bc0c44676ece25 | |
parent | a323edef54572ef968b86d3e2f442433df519e36 (diff) | |
parent | 18e036d6230b63bddceadfe99d303bab6b14d266 (diff) | |
download | cryptography-1c851f63c55835961ce12d7d40131b45928761f1.tar.gz cryptography-1c851f63c55835961ce12d7d40131b45928761f1.tar.bz2 cryptography-1c851f63c55835961ce12d7d40131b45928761f1.zip |
Merge pull request #1007 from alex/warning-stacklevel
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): |