Skip to content
This repository was archived by the owner on Apr 13, 2024. It is now read-only.

Commit 0e18601

Browse files
committed
Print deprecation message on old algorithms
1 parent 6958fe3 commit 0e18601

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

httpsig/sign.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@ def __init__(self, secret, algorithm=None):
2424
algorithm = DEFAULT_SIGN_ALGORITHM
2525

2626
assert algorithm in ALGORITHMS, "Unknown algorithm"
27+
28+
if algorithm != DEFAULT_SIGN_ALGORITHM:
29+
print("Algorithm: {} is deprecated please update to {}".format(algorithm, DEFAULT_SIGN_ALGORITHM))
30+
2731
if isinstance(secret, six.string_types):
2832
secret = secret.encode("ascii")
2933

0 commit comments

Comments
 (0)