Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/isida/4.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVitaliyS <hetleven@yandex.ua>2014-12-27 04:01:16 +0300
committerVitaliyS <hetleven@yandex.ua>2014-12-27 04:01:16 +0300
commit925064602d6343ff1b553acb36c73d278c19e6a1 (patch)
tree83c90ec364d84fe3106a0dadc676aab94c605cef
parent8fe2ca26467c28ce9a86491ad5b42d403420e789 (diff)
fix: WoT plugin
-rw-r--r--plugins/wot.py6
1 files 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: