summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWolfgang Rohdewald <wolfgang@rohdewald.de>2015-11-29 20:07:59 (GMT)
committerWolfgang Rohdewald <wolfgang@rohdewald.de>2016-08-24 11:47:06 (GMT)
commit3278b8a3828871f87ec932316da8112ab9c005c7 (patch)
tree1391fca9d9ab6e6dfe2df5cd230716169d3ac12e
parent001f09014854e2ada5d2835864b68087529331c7 (diff)
Debug.scores: fix showing non-ascii player names
-rw-r--r--src/game.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/game.py b/src/game.py
index 8f18935..9f5e5d8 100644
--- a/src/game.py
+++ b/src/game.py
@@ -30,7 +30,7 @@ from twisted.internet.defer import succeed
from util import gitHead
from rand import CountingRandom
from log import logError, logWarning, logException, logDebug, m18n
-from common import WINDS, Internal, IntDict, Debug, Options, unicodeString
+from common import WINDS, Internal, IntDict, Debug, Options, unicodeString, unicode
from common import isPython3
from query import Query
from rule import Ruleset
@@ -526,7 +526,7 @@ class Game(object):
"""save computed values to database,
update score table and balance in status line"""
scoretime = datetime.datetime.now().replace(microsecond=0).isoformat()
- logMessage = ''
+ logMessage = u''
for player in self.players:
if player.hand:
manualrules = '||'.join(x.rule.name
@@ -544,8 +544,8 @@ class Game(object):
player.handTotal, player.payment, player.balance,
self.rotated, self.notRotated),
(player.hand.string, manualrules))
- logMessage += '{player:<12} {hand:>4} {total:>5} {won} | '.format(
- player=str(player)[:12], hand=player.handTotal,
+ logMessage += u'{player:<12} {hand:>4} {total:>5} {won} | '.format(
+ player=unicode(player)[:12], hand=player.handTotal,
total=player.balance,
won='WON' if player == self.winner else ' ')
for usedRule in player.hand.usedRules: