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

Unified Diff: presubmit_support.py

Issue 8203002: Add assert to make sure the files argument type is valid. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: Created 9 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | tests/presubmit_unittest.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: presubmit_support.py
diff --git a/presubmit_support.py b/presubmit_support.py
index 85b3a3f70ccdc096fb807dd5978de18c1e7fb79b..0efaca1c8dea2dff36bdea85e50857992f783b33 100755
--- a/presubmit_support.py
+++ b/presubmit_support.py
@@ -690,6 +690,9 @@ class Change(object):
self._description_without_tags = (
'\n'.join(description_without_tags).rstrip())
+ assert all(
+ (isinstance(f, (list, tuple)) and len(f) == 2) for f in files), files
+
self._affected_files = [
self._AFFECTED_FILES(info[1], info[0].strip(), self._local_root)
for info in files
« no previous file with comments | « no previous file | tests/presubmit_unittest.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698