#NEWLINE# def refresh( self , data = None , force = False ) : #NEWLINE# #INDENT# widget = self . loop . widget #NEWLINE# while isinstance ( widget , urwid . Overlay ) : #NEWLINE# #INDENT# widget = widget . contents [ 0 ] [ 0 ] #NEWLINE# #UNINDENT# interested = force #NEWLINE# invalidate = False #NEWLINE# try : #NEWLINE# #INDENT# while True : #NEWLINE# #INDENT# event = self . sync . result_queue . get ( 0 ) #NEWLINE# if widget . interested ( event ) : #NEWLINE# #INDENT# interested = True #NEWLINE# #UNINDENT# if ( hasattr ( event , 'held_changed' ) and event . held_changed ) : #NEWLINE# #INDENT# invalidate = True #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# except queue . Empty : #NEWLINE# #INDENT# pass #NEWLINE# #UNINDENT# if interested : #NEWLINE# #INDENT# widget . refresh ( ) #NEWLINE# #UNINDENT# if invalidate : #NEWLINE# #INDENT# self . updateStatusQueries ( ) #NEWLINE# #UNINDENT# self . status . refresh ( )