#NEWLINE# def entries( self , indext ) : #NEWLINE# #INDENT# '\n        A generator that returns each INDX entry associated with\n          this header.\n        ' #NEWLINE# if ( ( self . entry_offset ( ) - self . offset ( ) ) >= self . entry_size ( ) ) : #NEWLINE# #INDENT# g_logger . debug ( 'No entries in this allocation block.' ) #NEWLINE# return #NEWLINE# #UNINDENT# if ( not self . _valid_fixups ) : #NEWLINE# #INDENT# g_logger . debug ( 'No fixups, so assuming no valid entries in allocation block.' ) #NEWLINE# return #NEWLINE# #UNINDENT# entry_class = None #NEWLINE# if ( indext == 'sdh' ) : #NEWLINE# #INDENT# entry_class = NTATTR_SDH_INDEX_ENTRY #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( indext == 'sii' ) : #NEWLINE# #INDENT# entry_class = NTATTR_SII_INDEX_ENTRY #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( indext == 'dir' ) : #NEWLINE# #INDENT# entry_class = NTATTR_DIRECTORY_INDEX_ENTRY #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# raise INDXException ( ( 'Unsupported index type: %r.' % indext ) ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# if ( ( '\x00' * 8 ) == self . _buf [ self . entry_offset ( ) : ( self . entry_offset ( ) + 8 ) ] . tostring ( ) ) : #NEWLINE# #INDENT# e = entry_class ( self . _buf , ( 24 + self . entry_offset ( ) ) , self ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# e = entry_class ( self . _buf , self . entry_offset ( ) , self ) #NEWLINE# #UNINDENT# ( yield indext ) #NEWLINE# while e . has_next ( ) : #NEWLINE# #INDENT# g_logger . debug ( 'Entry has another entry after it.' ) #NEWLINE# e = e . next ( ) #NEWLINE# ( yield e ) #NEWLINE# #UNINDENT# g_logger . debug ( 'No more entries.' )