switch to notebook.auth

master
manetta 2 years ago
parent a42c3cecd3
commit afbe46ef3c

@ -3,7 +3,7 @@
import argparse
import os, sys
# from IPython.lib import passwd
from hashlib import sha1
from notebook.auth import passwd
from jinja2 import Environment, FileSystemLoader
from random import shuffle
from csv import writer
@ -39,8 +39,7 @@ for username in usernames:
userdata = {}
userdata['username'] = username
userdata['password'] = password
# userdata['password_sha1'] = passwd(password)
userdata['password_sha1'] = sha1(password.encode("utf-8")).hexdigest()
userdata['password_sha1'] = passwd(password)
userdata['port'] = curport
userdata['servername'] = servername
users.append(userdata)

Loading…
Cancel
Save