# Try to pull a name out of the SReg response
sreg_res = SRegResponse.fromSuccessResponse(res)
try:
- username = sreg_res['nickname']
+ username = unicode(sreg_res['nickname'])
except:
- username = 'Anonymous'
+ username = u'Anonymous'
# Create db records
user = User(name=username)