def CheckForCopyright(filename, lines, error):
 for line in xrange(1, min(len(lines), 11)):
  if re.search('Copyright', lines[line], re.I):
   break
 else:
  error(filename, 0, 'legal/copyright', 5, 'No copyright message found.  You should have a line: "Copyright [year] <Copyright Owner>"')

def CheckForCopyright ( filename , lines , error ) : for line in xrange ( 1 , min ( len ( lines ) , 11 ) ) : if re . search ( 'Copyright' , lines [ line ] , re . I ) : break else : error ( filename , 0 , 'legal/copyright' , 5 , 'No copyright message found.  You should have a line: "Copyright [year] <Copyright Owner>"' )
logs an error if no copyright message appears at the top of the file .