Skip to content

Commit d235f03

Browse files
committed
Only running pycodestyle on existing files.
Issue introduced in googleapis#2486.
1 parent c441a39 commit d235f03

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

scripts/pycodestyle_on_repo.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@ def main():
3535
os.chdir(git_root)
3636
candidates, _ = get_affected_files()
3737
python_files = [
38-
candidate for candidate in candidates if candidate.endswith('.py')]
38+
candidate for candidate in candidates
39+
if candidate.endswith('.py') and os.path.exists(candidate)]
3940

4041
if not python_files:
4142
print('No Python files to lint, exiting.')

0 commit comments

Comments
 (0)