Skip to content

Commit

Permalink
Pepper: Fix PRESUBMIT when deleting files.
Browse files Browse the repository at this point in the history
The PRESUBMIT script for ppapi/ currently tried to open and check files, even
when they've been deleted. This makes it impossible to use the presubmit hooks
when removing certain files.

BUG=305289

Review URL: https://codereview.chromium.org/26518002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@227600 0039d316-1c4b-4281-b951-d872f2087c98
  • Loading branch information
teravest@chromium.org committed Oct 8, 2013
1 parent 2d10332 commit 4d60dcd
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions ppapi/PRESUBMIT.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ def RunUnittests(input_api, output_api):
# Verify that the files do not contain a 'TODO' in them.
RE_TODO = re.compile(r'\WTODO\W', flags=re.I)
def CheckTODO(input_api, output_api):
files = input_api.LocalPaths()
live_files = input_api.AffectedFiles(include_deletes=False)
files = [f.LocalPath() for f in live_files]
todo = []

for filename in files:
Expand Down Expand Up @@ -81,7 +82,8 @@ def CheckTODO(input_api, output_api):
# Verify that no CPP wrappers use un-versioned PPB interface name macros.
RE_UNVERSIONED_PPB = re.compile(r'\bPPB_\w+_INTERFACE\b')
def CheckUnversionedPPB(input_api, output_api):
files = input_api.LocalPaths()
live_files = input_api.AffectedFiles(include_deletes=False)
files = [f.LocalPath() for f in live_files]
todo = []

for filename in files:
Expand Down

0 comments on commit 4d60dcd

Please sign in to comment.