mirror of
https://github.com/uhIgnacio/EmoteManager.git
synced 2024-08-15 02:23:13 +00:00
fix 3.8 md5() compat
This commit is contained in:
parent
042dc1cf98
commit
da1e7abd09
3 changed files with 12 additions and 2 deletions
|
@ -5,5 +5,6 @@ from . import archive
|
|||
from . import emote
|
||||
from . import errors
|
||||
from . import paginator
|
||||
from . import compat
|
||||
# note: do not import .image in case the user doesn't want it
|
||||
# since importing image can take a long time.
|
||||
|
|
9
utils/compat.py
Normal file
9
utils/compat.py
Normal file
|
@ -0,0 +1,9 @@
|
|||
import hashlib
|
||||
|
||||
try:
|
||||
hashlib.md5(usedforsecurity=False)
|
||||
except TypeError:
|
||||
md5 = hashlib.md5
|
||||
else:
|
||||
def md5(*args):
|
||||
return hashlib.md5(*args, usedforsecurity=False)
|
Loading…
Add table
Add a link
Reference in a new issue