Skip to content

Commit e93c88b

Browse files
committed
fix: fix failing test when crypt is missing.
In 3.13 crypt is gone and there is no replacement as it's supplied by a .so as _crypt. Don't hardcode the crypt method in the array, add it (next to last) only if crypt was detected.
1 parent 95a3ab4 commit e93c88b

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

roundup/password.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -395,7 +395,10 @@ class Password(JournalPassword):
395395
1
396396
"""
397397

398-
deprecated_schemes = ["SSHA", "SHA", "MD5", "crypt", "plaintext"]
398+
deprecated_schemes = ["SSHA", "SHA", "MD5", "plaintext"]
399+
if crypt:
400+
# place just before plaintext if crypt is available
401+
deprecated_schemes.insert(-1, "crypt")
399402
experimental_schemes = ["PBKDF2S5"]
400403
known_schemes = ["PBKDF2"] + experimental_schemes + \
401404
deprecated_schemes

0 commit comments

Comments
 (0)