From 5031a7a5e765af0b2923f8b6ae39f0dc01aaf164 Mon Sep 17 00:00:00 2001 From: Tim Van Baak Date: Tue, 14 Jan 2020 19:07:18 -0800 Subject: [PATCH] Fix import in user-passwd --- amanuensis/cli.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/amanuensis/cli.py b/amanuensis/cli.py index 4d436df..d702690 100644 --- a/amanuensis/cli.py +++ b/amanuensis/cli.py @@ -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):