Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(159)

Issue 2250353003: Do not assume that all presubmit directories still exist. (Closed)

Created:
4 years, 4 months ago by Tobias Sargeant
Modified:
4 years, 4 months ago
Reviewers:
tandrii(chromium)
CC:
chromium-reviews, dpranke+depot_tools_chromium.org, iannucci+depot_tools_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/tools/depot_tools.git@master
Target Ref:
refs/heads/master
Visibility:
Public.

Description

Do not assume that all presubmit directories still exist. In the case where a CL deletes the last file in the directory, it is listed in the presubmit files list, but the directory to which it refers will not exist, leading to os.listdir failing. BUG=638343 Committed: https://chromium.googlesource.com/chromium/tools/depot_tools/+/ff061c0d1d2d30909e201487cc72c106335ac3c6

Patch Set 1 #

Patch Set 2 : Don't reassign |files| #

Total comments: 2

Patch Set 3 : wrap the whole loop in a try block instead. #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+8 lines, -5 lines) Patch
M presubmit_support.py View 1 2 1 chunk +8 lines, -5 lines 1 comment Download

Messages

Total messages: 12 (3 generated)
Tobias Sargeant
4 years, 4 months ago (2016-08-17 09:35:39 UTC) #2
tandrii(chromium)
LGTM % suggestion https://codereview.chromium.org/2250353003/diff/20001/presubmit_support.py File presubmit_support.py (right): https://codereview.chromium.org/2250353003/diff/20001/presubmit_support.py#newcode1099 presubmit_support.py:1099: directory_files = [] continue it's shorter ...
4 years, 4 months ago (2016-08-17 09:39:13 UTC) #3
Tobias Sargeant
https://codereview.chromium.org/2250353003/diff/20001/presubmit_support.py File presubmit_support.py (right): https://codereview.chromium.org/2250353003/diff/20001/presubmit_support.py#newcode1099 presubmit_support.py:1099: directory_files = [] On 2016/08/17 09:39:13, tandrii(chromium) wrote: > ...
4 years, 4 months ago (2016-08-17 09:57:45 UTC) #4
tandrii(chromium)
https://codereview.chromium.org/2250353003/diff/40001/presubmit_support.py File presubmit_support.py (right): https://codereview.chromium.org/2250353003/diff/40001/presubmit_support.py#newcode1097 presubmit_support.py:1097: for f in os.listdir(directory): the only thing that can ...
4 years, 4 months ago (2016-08-17 10:01:56 UTC) #5
Tobias Sargeant
On 2016/08/17 10:01:56, tandrii(chromium) wrote: > https://codereview.chromium.org/2250353003/diff/40001/presubmit_support.py > File presubmit_support.py (right): > > https://codereview.chromium.org/2250353003/diff/40001/presubmit_support.py#newcode1097 > ...
4 years, 4 months ago (2016-08-17 10:15:35 UTC) #6
tandrii(chromium)
LGTM you already have. this CL isn't worth the time we burn on discussions.
4 years, 4 months ago (2016-08-17 10:18:03 UTC) #7
tandrii(chromium)
On 2016/08/17 10:18:03, tandrii(chromium) wrote: > LGTM you already have. this CL isn't worth the ...
4 years, 4 months ago (2016-08-17 10:18:40 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2250353003/40001
4 years, 4 months ago (2016-08-17 10:20:43 UTC) #10
commit-bot: I haz the power
4 years, 4 months ago (2016-08-17 10:24:03 UTC) #12
Message was sent while issue was closed.
Committed patchset #3 (id:40001) as
https://chromium.googlesource.com/chromium/tools/depot_tools/+/ff061c0d1d2d30...

Powered by Google App Engine
This is Rietveld 408576698