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

Unified Diff: pylib/gyp/input.py

Issue 1364373004: Fix infinite loop on empty variable name. (Closed) Base URL: https://chromium.googlesource.com/external/gyp@master
Patch Set: Created 5 years, 3 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 | test/variables/empty/empty.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pylib/gyp/input.py
diff --git a/pylib/gyp/input.py b/pylib/gyp/input.py
index f46ca795d4c09ed7d2e2b3a3d758bd5065d3d35d..bc68c3765dba98fc6f96dfba7e9ab1e06aa3d677 100644
--- a/pylib/gyp/input.py
+++ b/pylib/gyp/input.py
@@ -57,7 +57,7 @@ def IsPathSection(section):
# If section ends in one of the '=+?!' characters, it's applied to a section
# without the trailing characters. '/' is notably absent from this list,
# because there's no way for a regular expression to be treated as a path.
- while section[-1:] in '=+?!':
+ while section and section[-1:] in '=+?!':
section = section[:-1]
if section in path_sections:
« no previous file with comments | « no previous file | test/variables/empty/empty.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698