Mercurial > public > mercurial-scm > hg-stable
diff contrib/check-code.py @ 19494:3119dc155ac2 stable
check-code: do not abort on an unreadable file, only report this
author | Simon Heimberg <simohe@besonet.ch> |
---|---|
date | Mon, 22 Jul 2013 10:04:45 +0200 |
parents | d9e86d656017 |
children | 725507cd5216 |
line wrap: on
line diff
--- a/contrib/check-code.py Thu Jul 25 00:54:49 2013 -0500 +++ b/contrib/check-code.py Mon Jul 22 10:04:45 2013 +0200 @@ -407,7 +407,11 @@ print "Skipping %s for %s it doesn't match %s" % ( name, match, f) continue - fp = open(f) + try: + fp = open(f) + except IOError, e: + print "Skipping %s, %s" % (f, str(e).split(':', 1)[0]) + continue pre = post = fp.read() fp.close() if "no-" "check-code" in pre: