Moved Codec conversion to Charset
The TIP is using a codec conversion that doesn't handle error exeptions. This could lock up the HUD....
This commit is contained in:
parent
5a13e96b3b
commit
27e5bf8698
|
@ -57,6 +57,7 @@ import re
|
||||||
# FreePokerTools modules
|
# FreePokerTools modules
|
||||||
import Configuration
|
import Configuration
|
||||||
import Database
|
import Database
|
||||||
|
import Charset
|
||||||
|
|
||||||
|
|
||||||
re_Places = re.compile("_[0-9]$")
|
re_Places = re.compile("_[0-9]$")
|
||||||
|
@ -67,7 +68,7 @@ import codecs
|
||||||
encoder = codecs.lookup(Configuration.LOCALE_ENCODING)
|
encoder = codecs.lookup(Configuration.LOCALE_ENCODING)
|
||||||
|
|
||||||
def do_tip(widget, tip):
|
def do_tip(widget, tip):
|
||||||
(_tip, _len) = encoder.encode(tip)
|
_tip = Charset.to_utf8(tip)
|
||||||
widget.set_tooltip_text(_tip)
|
widget.set_tooltip_text(_tip)
|
||||||
|
|
||||||
def do_stat(stat_dict, player = 24, stat = 'vpip'):
|
def do_stat(stat_dict, player = 24, stat = 'vpip'):
|
||||||
|
|
Loading…
Reference in New Issue
Block a user