#NEWLINE# @ wrap_exceptions #NEWLINE# def open_files( self ) : #NEWLINE# #INDENT# retlist = [ ] #NEWLINE# hit_enoent = False #NEWLINE# procfs_path = self . _procfs_path #NEWLINE# pathdir = ( '%s/%d/path' % ( procfs_path , self . pid ) ) #NEWLINE# for fd in os . listdir ( ( '%s/%d/fd' % ( procfs_path , self . pid ) ) ) : #NEWLINE# #INDENT# path = os . path . join ( pathdir , fd ) #NEWLINE# if os . path . islink ( err ) : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# file = os . readlink ( path ) #NEWLINE# #UNINDENT# except OSError as err : #NEWLINE# #INDENT# if ( err . errno == errno . ENOENT ) : #NEWLINE# #INDENT# hit_enoent = True #NEWLINE# continue #NEWLINE# #UNINDENT# raise #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if isfile_strict ( file ) : #NEWLINE# #INDENT# retlist . append ( _common . popenfile ( file , int ( fd ) ) ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# #UNINDENT# if hit_enoent : #NEWLINE# #INDENT# os . stat ( ( '%s/%s' % ( procfs_path , self . pid ) ) ) #NEWLINE# #UNINDENT# return retlist