#7510 BLOC 8.2.0 (: Control Panel 'About Me' incorrectly keeps a name edit when you choose to Cancel out
Zarro Boogs per Child
bugtracker at laptop.org
Wed Jul 16 05:04:59 EDT 2008
#7510: Control Panel 'About Me' incorrectly keeps a name edit when you choose to
Cancel out
---------------------------+------------------------------------------------
Reporter: garycmartin | Owner: erikos
Type: defect | Status: new
Priority: blocker | Milestone: 8.2.0 (was Update.2)
Component: sugar | Version: Development build as of this date
Resolution: | Keywords: r?
Next_action: code | Verified: 0
Blockedby: | Blocking:
---------------------------+------------------------------------------------
Changes (by erikos):
* keywords: => r?
Comment:
{{{
diff --git a/src/controlpanel/model/aboutme.py
b/src/controlpanel/model/aboutme.py
index c3d1a5e..3818792 100644
--- a/src/controlpanel/model/aboutme.py
+++ b/src/controlpanel/model/aboutme.py
@@ -43,7 +43,9 @@ def set_nick(nick):
if not nick:
raise ValueError(_("You must enter a name."))
pro = profile.get_profile()
- pro.nick_name = unicode(nick, "utf-8")
+ if not isinstance(nick, unicode):
+ nick = unicode(nick, 'utf-8')
+ pro.nick_name = nick
pro.save()
return 1
}}}
The patch above does check if the nick is in unicode already before
decoding it. I first wanted to convert all the command line input into
unicode but that would lead into some more changes that I do not want to
do at this moment in time.
--
Ticket URL: <http://dev.laptop.org/ticket/7510#comment:3>
One Laptop Per Child <http://laptop.org/>
OLPC bug tracking system
More information about the Bugs
mailing list