parameters: (self, srcs)
docstring: _check_thrift_srcs_name.
  
          Checks whether the thrift file's name ends with 'thrift'.
docstring_summary: _check_thrift_srcs_name.
docstring_tokens: _check_thrift_srcs_name .
function: def _check_thrift_srcs_name(self, srcs):
          """_check_thrift_srcs_name.
  
          Checks whether the thrift file's name ends with 'thrift'.
  
          """
          error = 0
          for src in srcs:
              base_name = os.path.basename(src)
              pos = base_name.rfind('.')
              if pos == -1:
                  console.error('invalid thrift file name %s' % src)
                  error += 1
              file_suffix = base_name[pos + 1:]
              if file_suffix != 'thrift':
                  console.error('invalid thrift file name %s' % src)
                  error += 1
          if error > 0:
              console.error_exit('invalid thrift file names found.')
function_tokens: def _check_thrift_srcs_name ( self , srcs ) : error = 0 for src in srcs : base_name = os . path . basename ( src ) pos = base_name . rfind ( '.' ) if pos == - 1 : console . error ( 'invalid thrift file name %s' % src ) error += 1 file_suffix = base_name [ pos + 1 : ] if file_suffix != 'thrift' : console . error ( 'invalid thrift file name %s' % src ) error += 1 if error > 0 : console . error_exit ( 'invalid thrift file names found.' )