##// END OF EJS Templates
check-code: do not abort on an unreadable file, only report this
Simon Heimberg -
r19494:3119dc15 stable
parent child Browse files
Show More
@@ -407,7 +407,11 b' def checkfile(f, logfunc=_defaultlogger.'
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:
@@ -187,8 +187,10 b''
187 > # this next line is okay
187 > # this next line is okay
188 > raise SomeException(arg1, arg2)
188 > raise SomeException(arg1, arg2)
189 > EOF
189 > EOF
190 $ "$check_code" raise-format.py
190 $ "$check_code" not-existing.py raise-format.py
191 Skipping*not-existing.py* (glob)
191 raise-format.py:1:
192 raise-format.py:1:
192 > raise SomeException, message
193 > raise SomeException, message
193 don't use old-style two-argument raise, use Exception(message)
194 don't use old-style two-argument raise, use Exception(message)
194 [1]
195 [1]
196
General Comments 0
You need to be logged in to leave comments. Login now