parameters: (src_lfile, dst_lfile)
docstring: Fix the license file, if there is one, so that it conforms to the SIP
      v5 syntax.  src_lfile is the name of the license file.  dst_lfile is the
      name of the fixed license file.
docstring_summary: Fix the license file, if there is one, so that it conforms to the SIP
      v5 syntax.  src_lfile is the name of the license file.  dst_lfile is the
      name of the fixed license file.
docstring_tokens: Fix the license file if there is one so that it conforms to the SIP v5 syntax . src_lfile is the name of the license file . dst_lfile is the name of the fixed license file .
function: def fix_license(src_lfile, dst_lfile):
      """ Fix the license file, if there is one, so that it conforms to the SIP
      v5 syntax.  src_lfile is the name of the license file.  dst_lfile is the
      name of the fixed license file.
      """
  
      f = open(src_lfile)
      f5 = open_for_writing(dst_lfile)
  
      for line in f:
          if line.startswith('%License'):
              anno_start = line.find('/')
              anno_end = line.rfind('/')
  
              if anno_start < 0 or anno_end < 0 or anno_start == anno_end:
                  error("%s has missing annotations." % name)
  
              annos = line[anno_start + 1:anno_end].split(', ')
              annos5 = [anno[0].lower() + anno[1:] for anno in annos]
  
              f5.write('%License(')
              f5.write(', '.join(annos5))
              f5.write(')\n')
          else:
              f5.write(line)
  
      f5.close()
      f.close()
function_tokens: def fix_license ( src_lfile , dst_lfile ) : f = open ( src_lfile ) f5 = open_for_writing ( dst_lfile ) for line in f : if line . startswith ( '%License' ) : anno_start = line . find ( '/' ) anno_end = line . rfind ( '/' ) if anno_start < 0 or anno_end < 0 or anno_start == anno_end : error ( "%s has missing annotations." % name ) annos = line [ anno_start + 1 : anno_end ] . split ( ', ' ) annos5 = [ anno [ 0 ] . lower ( ) + anno [ 1 : ] for anno in annos ] f5 . write ( '%License(' ) f5 . write ( ', ' . join ( annos5 ) ) f5 . write ( ')\n' ) else : f5 . write ( line ) f5 . close ( ) f . close ( )