Update __init__.py

This commit is contained in:
Jay Lee 2021-02-24 14:36:39 -05:00 committed by GitHub
parent b738d57433
commit 2685aa049d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -79,11 +79,7 @@ from gam import transport
from gam import utils
from gam.var import *
if platform.system() == 'Windows':
# No crypt module on Win, use passlib
from passlib.hash import sha512_crypt
else:
from crypt import crypt
from passlib.hash import sha512_crypt
if platform.system() == 'Linux':
import distro
@ -1423,9 +1419,7 @@ def addDelegates(users, i):
def gen_sha512_hash(password):
if platform.system() == 'Windows':
return sha512_crypt.hash(password, rounds=5000)
return crypt(password)
return sha512_crypt.hash(password, rounds=5000)
def printShowDelegates(users, csvFormat):