aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortilly-Q <nattilypigeonfowl@gmail.com>2013-09-29 14:34:41 -0400
committerChristopher Allan Webber <cwebber@dustycloud.org>2014-07-10 10:28:34 -0500
commit4285fc67b30e8e97d7ea26e5085438a9bd8ac44b (patch)
tree97e48156b3cb18957a7d91882fbf5c1b9cf894cc
parent4b24678a1f6ae0835cb1bca4d23611b57a433d39 (diff)
downloadmediagoblin-4285fc67b30e8e97d7ea26e5085438a9bd8ac44b.tar.lz
mediagoblin-4285fc67b30e8e97d7ea26e5085438a9bd8ac44b.tar.xz
mediagoblin-4285fc67b30e8e97d7ea26e5085438a9bd8ac44b.zip
This was a very simple update. The gmg command `adduser` was generating an
unncessary error because we were searching for a non-unicode string value in a Unicode column of the core__users table.
-rw-r--r--mediagoblin/gmg_commands/users.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/mediagoblin/gmg_commands/users.py b/mediagoblin/gmg_commands/users.py
index 186557e0..71149497 100644
--- a/mediagoblin/gmg_commands/users.py
+++ b/mediagoblin/gmg_commands/users.py
@@ -34,7 +34,7 @@ def adduser(args):
#TODO: Lets trust admins this do not validate Emails :)
commands_util.setup_app(args)
- args.username = commands_util.prompt_if_not_set(args.username, "Username:")
+ args.username = unicode(commands_util.prompt_if_not_set(args.username, "Username:"))
args.password = commands_util.prompt_if_not_set(args.password, "Password:",True)
args.email = commands_util.prompt_if_not_set(args.email, "Email:")
@@ -50,7 +50,7 @@ def adduser(args):
else:
# Create the user
entry = db.User()
- entry.username = unicode(args.username.lower())
+ entry.username = args.username.lower()
entry.email = unicode(args.email)
entry.pw_hash = auth.gen_password_hash(args.password)
default_privileges = [