~bac/charms/precise/juju-gui/trunk

« back to all changes in this revision

Viewing changes to server/guiserver/auth.py

  • Committer: Francesco Banconi
  • Date: 2013-10-17 14:18:45 UTC
  • mfrom: (117.1.3 encoding-problem)
  • Revision ID: francesco.banconi@canonical.com-20131017141845-0okixzvhljfd4gaa
Fix string encoding problem in guiserver.

The Juju API connection was dropped as
result of an error while logging responses
containing non-ascii characters.

R=gary.poster
CC=
https://codereview.appspot.com/14772044

Show diffs side-by-side

added added

removed removed

Lines of Context:
60
60
        return '<User: {} ({})>'.format(username, status)
61
61
 
62
62
    def __str__(self):
63
 
        return self.username
 
63
        return self.username.encode('utf-8')
64
64
 
65
65
 
66
66
class AuthMiddleware(object):