#NEWLINE# def _search( quidditch , retries = 5 ) : #NEWLINE# #INDENT# '\n    a wrapper method for the pywinupdater class. I might move this into the class, but right now,\n    that is to much for one class I think.\n    ' #NEWLINE# passed = False #NEWLINE# clean = True #NEWLINE# comment = '' #NEWLINE# while ( not passed ) : #NEWLINE# #INDENT# log . debug ( 'Searching. tries left: {0}' . format ( retries ) ) #NEWLINE# passed = quidditch . AutoSearch ( ) #NEWLINE# log . debug ( 'Done searching: {0}' . format ( str ( passed ) ) ) #NEWLINE# if isinstance ( passed , Exception ) : #NEWLINE# #INDENT# clean = False #NEWLINE# comment += 'Failed in the seeking/parsing process:\n\t\t{0}\n' . format ( passed ) #NEWLINE# retries -= 1 #NEWLINE# if retries : #NEWLINE# #INDENT# comment += '{0} tries to go. retrying\n' . format ( str ( retries ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# comment += 'out of retries. this update round failed.\n' #NEWLINE# return ( comment , True , retries ) #NEWLINE# #UNINDENT# passed = False #NEWLINE# #UNINDENT# #UNINDENT# if clean : #NEWLINE# #INDENT# comment += 'Search was done without error.\n' #NEWLINE# #UNINDENT# return ( comment , True , retries )