From 0856f27b460fcdeed24181a4fce7b1a75590282a Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Wed, 27 Dec 2023 03:22:30 +0100 Subject: [PATCH] Unused imports --- src/user.py | 1 - src/utils/password.py | 3 +-- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/src/user.py b/src/user.py index cda0487292..2302ef2714 100644 --- a/src/user.py +++ b/src/user.py @@ -21,7 +21,6 @@ import pwd import grp import random -import string import subprocess import copy from logging import getLogger diff --git a/src/utils/password.py b/src/utils/password.py index 0e48371f1b..de9ef2c483 100644 --- a/src/utils/password.py +++ b/src/utils/password.py @@ -21,7 +21,6 @@ import string import subprocess import yaml -import passlib.hash SMALL_PWD_LIST = [ "yunohost", @@ -73,7 +72,7 @@ def assert_password_is_strong_enough(profile, password): def _hash_user_password(password): - import passlib + import passlib.hash # passlib will returns something like: # $6$rounds=656000$AwCIMolbTAyQhtev$46UvYfVgs.k0Bt6fLTekBHyCcCFkix/NNfgAWiICX.9YUPVYZ3PsIAwY99yP5/tXhg2sYBaAhKj6W3kuYWaR3. # cf https://passlib.readthedocs.io/en/stable/modular_crypt_format.html#modular-crypt-format