Skip to content

Commit 68d3821

Browse files
committed
top-level bcrypt import
1 parent cc55242 commit 68d3821

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

jupyterhub_traefik_proxy/proxy.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
from subprocess import Popen, TimeoutExpired
2727
from urllib.parse import urlparse, urlunparse
2828

29+
import bcrypt
2930
from jupyterhub.proxy import Proxy
3031
from jupyterhub.utils import exponential_backoff, new_token, url_path_join
3132
from tornado.httpclient import AsyncHTTPClient, HTTPClientError
@@ -305,8 +306,6 @@ def _warn_empty_username(self):
305306

306307
@default("traefik_api_hashed_password")
307308
def _generate_htpassword(self):
308-
import bcrypt
309-
310309
return bcrypt.hashpw(
311310
self.traefik_api_password.encode("utf8"), bcrypt.gensalt()
312311
).decode("ascii")

0 commit comments

Comments
 (0)