changeset 89:9e2ae3d086ce

Adapt admin module to user handling changes.
author Daniele Nicolodi <daniele@grinta.net>
date Sun, 21 Aug 2011 18:17:27 +0200
parents 7d03f602cade
children c55432c9600b
files src/ltpdarepo/admin.py
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/ltpdarepo/admin.py	Sun Aug 21 18:17:26 2011 +0200
+++ b/src/ltpdarepo/admin.py	Sun Aug 21 18:17:27 2011 +0200
@@ -94,8 +94,10 @@
         user = User.load(username)
         if user is not None:
             raise Exception('User already present')
-        user = User(username, password=password, **kwargs)
+        user = User(username, **kwargs)
         user.create()
+        if password:
+            user.passwd(password)
 
 cmd = commands.add(useradd)
 cmd.add_argument('username', metavar='USERNAME')