mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Fix mypy and flake8 checks
This commit is contained in:
@@ -173,16 +173,17 @@ class FilenameUniqDict(dict):
|
||||
def fips_safe_md5(data=b'', **kwargs):
|
||||
"""Wrapper around hashlib.md5
|
||||
|
||||
Attempt call with 'usedforsecurity=False' if we get a ValueError, which happens when OpenSSL FIPS mode is enabled:
|
||||
Attempt call with 'usedforsecurity=False' if we get a ValueError, which happens when
|
||||
OpenSSL FIPS mode is enabled:
|
||||
ValueError: error:060800A3:digital envelope routines:EVP_DigestInit_ex:disabled for fips
|
||||
|
||||
See: https://github.com/sphinx-doc/sphinx/issues/7611
|
||||
"""
|
||||
|
||||
try:
|
||||
return md5(data, **kwargs)
|
||||
return md5(data, **kwargs) # type: ignore
|
||||
except ValueError:
|
||||
return md5(data, **kwargs, usedforsecurity=False)
|
||||
return md5(data, **kwargs, usedforsecurity=False) # type: ignore
|
||||
|
||||
|
||||
class DownloadFiles(dict):
|
||||
|
||||
Reference in New Issue
Block a user