Fix import in user-passwd

This commit is contained in:
Tim Van Baak 2020-01-14 19:07:18 -08:00
parent ede475f910
commit 5031a7a5e7
1 changed files with 5 additions and 5 deletions

View File

@ -175,17 +175,17 @@ def command_user_passwd(args):
import os
import config
from user import User, get_user_by_username
import user
if not args.username:
args.username = input("Username: ")
uid = uid_from_username(args.username)
uid = user.uid_from_username(args.username)
if uid is None:
print("No user with username '{}'".format(args.username))
config.logger.error("No user with username '{}'".format(args.username))
return -1
user = User(uid)
u = user.user_from_uid(uid)
pw = getpass.getpass("Password: ")
user.set_password(pw)
u.set_password(pw)
@add_argument("--foo", action="store_true")
def command_dump(args):