#NEWLINE# def _iter_objects( self , container ) : #NEWLINE# #INDENT# '\n        Generate a list of objects to process.\n\n        :param container: the name of the container to process\n\n        If the given container is empty and older than reclaim_age this\n        processor will attempt to reap it.\n        ' #NEWLINE# self . logger . debug ( 'looking for objects in %s' , container ) #NEWLINE# found_obj = False #NEWLINE# try : #NEWLINE# #INDENT# for raw_obj in self . swift . iter_objects ( MISPLACED_OBJECTS_ACCOUNT , container ) : #NEWLINE# #INDENT# found_obj = True #NEWLINE# ( yield raw_obj ) #NEWLINE# #UNINDENT# #UNINDENT# except UnexpectedResponse as err : #NEWLINE# #INDENT# self . logger . error ( 'Error listing objects in container %s (%s)' , container , err ) #NEWLINE# #UNINDENT# if ( ( float ( container ) < ( time . time ( ) - container . reclaim_age ) ) and ( not found_obj ) ) : #NEWLINE# #INDENT# self . swift . delete_container ( MISPLACED_OBJECTS_ACCOUNT , container , acceptable_statuses = ( 2 , 404 , 409 , 412 ) )