We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 8a8263e + 6b25e39 commit 4b76c14Copy full SHA for 4b76c14
bagit.py
@@ -122,7 +122,12 @@ def find_locale_dir():
122
# Payload-Oxum is autogenerated
123
]
124
125
-CHECKSUM_ALGOS = hashlib.algorithms_guaranteed
+try:
126
+ CHECKSUM_ALGOS = hashlib.algorithms_guaranteed
127
+except AttributeError:
128
+ # FIXME: remove when we drop Python 2 (https://github.com/LibraryOfCongress/bagit-python/issues/102)
129
+ # Python 2.7.0-2.7.8
130
+ CHECKSUM_ALGOS = set(hashlib.algorithms)
131
DEFAULT_CHECKSUMS = ["sha256", "sha512"]
132
133
#: Block size used when reading files for hashing:
0 commit comments