Fix Python 2.5 compatibility

This commit is contained in:
Calum Lind 2013-04-23 00:21:49 +01:00
parent 19093e03ae
commit 83f0d72601
1 changed files with 5 additions and 2 deletions

View File

@ -135,10 +135,13 @@ def cell_data_trackericon(column, cell, model, row, data):
pixbuf = create_blank_pixbuf()
#Supress Warning: g_object_set_qdata: assertion `G_IS_OBJECT (object)' failed
with warnings.catch_warnings():
warnings.simplefilter("ignore")
original_filters = warnings.filters[:]
warnings.simplefilter("ignore")
try:
if cell.get_property("pixbuf") != pixbuf:
cell.set_property("pixbuf", pixbuf)
finally:
warnings.filters = original_filters
host = model[row][data]
if host: