Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.

Commit

Permalink
Fix missing file issues in check-code
Browse files Browse the repository at this point in the history
  • Loading branch information
kemitche authored and chromakode committed Mar 21, 2013
1 parent fc9abd1 commit 73f0d97
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions r2/check-code
Expand Up @@ -128,10 +128,13 @@ def select_files(files):
if re.match(PYFILE, f):
yield f
else:
with open(f) as f_:
first = f_.readline()
if first.startswith('#!') and 'python' in first:
yield f
try:
with open(f) as f_:
first = f_.readline()
if first.startswith('#!') and 'python' in first:
yield f
except (IOError, OSError):
logging.exception("Unable to check-code against %s", f)


def extract_errtype(violation, tool):
Expand Down

0 comments on commit 73f0d97

Please sign in to comment.