contrib/check-code.py
branchstable
changeset 19494 3119dc155ac2
parent 19422 d9e86d656017
child 19501 725507cd5216
equal deleted inserted replaced
19493:ca76e77dd663 19494:3119dc155ac2
   405         if not re.match(match, f):
   405         if not re.match(match, f):
   406             if debug:
   406             if debug:
   407                 print "Skipping %s for %s it doesn't match %s" % (
   407                 print "Skipping %s for %s it doesn't match %s" % (
   408                        name, match, f)
   408                        name, match, f)
   409             continue
   409             continue
   410         fp = open(f)
   410         try:
       
   411             fp = open(f)
       
   412         except IOError, e:
       
   413             print "Skipping %s, %s" % (f, str(e).split(':', 1)[0])
       
   414             continue
   411         pre = post = fp.read()
   415         pre = post = fp.read()
   412         fp.close()
   416         fp.close()
   413         if "no-" "check-code" in pre:
   417         if "no-" "check-code" in pre:
   414             if debug:
   418             if debug:
   415                 print "Skipping %s for %s it has no-" " check-code" % (
   419                 print "Skipping %s for %s it has no-" " check-code" % (