From 1b2dacc9697e428adf136b81c684294e0a13b72c Mon Sep 17 00:00:00 2001 From: VitaliyS Date: Sat, 27 Dec 2014 03:01:16 +0200 Subject: [PATCH] fix: WoT plugin --- plugins/wot.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/wot.py b/plugins/wot.py index b3fe7d4..46fca56 100644 --- a/plugins/wot.py +++ b/plugins/wot.py @@ -114,7 +114,7 @@ def wot(type, jid, nick, text): msg = '%s: %s/%s' % (wotname, wins, battles) else: - if 1: #try: + try: win_percent = round(100.0 * wins / battles, 2) msg = '%s: %s/%s (%s%%)' % (wotname, wins, battles, win_percent) @@ -223,8 +223,8 @@ def wot(type, jid, nick, text): msg = L('%s\n- in battle: %s','%s/%s'%(jid,nick)) % (msg, datetime.datetime.fromtimestamp(pdata[player_id]['last_battle_time'])) msg = L('%s\n- online: %s','%s/%s'%(jid,nick)) % (msg, datetime.datetime.fromtimestamp(pdata[player_id]['logout_at'])) - #except: - # msg = L('Impossible to get statistics','%s/%s'%(jid,nick)) + except: + msg = L('Impossible to get statistics','%s/%s'%(jid,nick)) elif not pdata['status']: msg = L('Query error','%s/%s'%(jid,nick)) else: