prevent NoneType TB if fontattrs are not set

This commit is contained in:
Dimitur Kirov 2005-09-17 08:42:37 +00:00
parent 8e2dd60449
commit 159a4dad42
1 changed files with 5 additions and 4 deletions

View File

@ -38,6 +38,7 @@ def get_theme_font_for_option(theme, option):
font_name = gajim.config.get_per('themes', theme, option) font_name = gajim.config.get_per('themes', theme, option)
font_desc = pango.FontDescription() font_desc = pango.FontDescription()
font_prop_str = gajim.config.get_per('themes', theme, option + 'attrs') font_prop_str = gajim.config.get_per('themes', theme, option + 'attrs')
if font_prop_str:
if font_prop_str.find('B') != -1: if font_prop_str.find('B') != -1:
font_desc.set_weight(pango.WEIGHT_BOLD) font_desc.set_weight(pango.WEIGHT_BOLD)
if font_prop_str.find('I') != -1: if font_prop_str.find('I') != -1: