From ca0f81e1900178455b93f3cc4cb594f51361da30 Mon Sep 17 00:00:00 2001 From: Michael Ziegler Date: Fri, 24 Jun 2011 18:42:46 +0200 Subject: [PATCH] fix encoding issue when printing user names. fixes #160 --- pyweb/mumble/models.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pyweb/mumble/models.py b/pyweb/mumble/models.py index 5229d02..ae6d797 100644 --- a/pyweb/mumble/models.py +++ b/pyweb/mumble/models.py @@ -28,6 +28,7 @@ from django.contrib.auth.models import User from django.db import models from django.db.models import signals from django.conf import settings +from django.utils.encoding import smart_str from mumble.mmobjects import mmChannel, mmPlayer from mumble.mctl import MumbleCtlBase @@ -380,7 +381,7 @@ class Mumble( models.Model ): if playerdata.userid not in unseen_ids: if verbose: - print 'Found new User "%s".' % playerdata.name + print 'Found new User "%s".' % smart_str(playerdata.name) playerinstance = MumbleUser( mumbleid = playerdata.userid, @@ -392,7 +393,7 @@ class Mumble( models.Model ): else: if verbose > 1: - print "User '%s' is already known." % playerdata.name + print "User '%s' is already known." % smart_str(playerdata.name) unseen_ids.remove(playerdata.userid) playerinstance = MumbleUser.objects.get( server=self, mumbleid=playerdata.userid ) playerinstance.name = playerdata.name