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

Unified Diff: net/tools/dafsa/make_dafsa.py

Issue 1756733003: Support all possible bitflags when computing the PSL DAFSA (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Review feedback Created 4 years, 10 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 | net/tools/dafsa/make_dafsa_unittest.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/tools/dafsa/make_dafsa.py
diff --git a/net/tools/dafsa/make_dafsa.py b/net/tools/dafsa/make_dafsa.py
index 78358effa840d7b072875f1198f502ad39fb96f9..5c9082d372c18007b853a9e9599c57b5e253f736 100755
--- a/net/tools/dafsa/make_dafsa.py
+++ b/net/tools/dafsa/make_dafsa.py
@@ -448,10 +448,10 @@ def parse_gperf(infile):
for line in lines:
if line[-3:-1] != ', ':
raise InputError('Expected "domainname, <digit>", found "%s"' % line)
- # Technically the DAFSA format could support return values in range [0-31],
- # but the values below are the only with a defined meaning.
- if line[-1] not in '0124':
- raise InputError('Expected value to be one of {0,1,2,4}, found "%s"' %
+ # Technically the DAFSA format can support return values in the range
+ # [0-31], but only the first three bits have any defined meaning.
+ if not line.endswith(('0', '1', '2', '3', '4', '5', '6', '7')):
+ raise InputError('Expected value to be in the range of 0-7, found "%s"' %
line[-1])
return [line[:-3] + line[-1] for line in lines]
« no previous file with comments | « no previous file | net/tools/dafsa/make_dafsa_unittest.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698