]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
practracker: replaces "overstrict" with "overbroad"
authorNick Mathewson <nickm@torproject.org>
Thu, 1 Aug 2019 13:35:33 +0000 (09:35 -0400)
committerNick Mathewson <nickm@torproject.org>
Thu, 1 Aug 2019 13:35:33 +0000 (09:35 -0400)
I had the logic reversed here.

changes/ticket30752
scripts/maint/practracker/practracker.py
scripts/maint/practracker/problem.py

index 754a9003d1c97d78c75d4b1b89fee9f6ce471afc..044c7c7d9349bffef4e888ca8f10c9bb266d442e 100644 (file)
@@ -1,6 +1,6 @@
   o Minor features (best practices tracker):
     - Give a warning rather than an error when a practracker exception is
-      violated by a small amount; add a --list-overstrict option to
+      violated by a small amount; add a --list-overbroad option to
       practracker that lists exceptions that are stricter than they need to
       be, and provide an environment variable for disabling
       practracker. Closes ticekt 30752.
index 245d01d36d44f07a3113cd4d3e9e0290e44f69e1..a4e951ac7c2e92763c72f5557bbc426dbe8dc28f 100755 (executable)
@@ -153,7 +153,7 @@ def main(argv):
     parser = argparse.ArgumentParser(prog=progname)
     parser.add_argument("--regen", action="store_true",
                         help="Regenerate the exceptions file")
-    parser.add_argument("--list-overstrict", action="store_true",
+    parser.add_argument("--list-overbroad", action="store_true",
                         help="List over-strict exceptions")
     parser.add_argument("--exceptions",
                         help="Override the location for the exceptions file")
@@ -200,7 +200,7 @@ def main(argv):
 
     # 2.1) Adjust the exceptions so that we warn only about small problems,
     # and produce errors on big ones.
-    if not (args.regen or args.list_overstrict or args.strict):
+    if not (args.regen or args.list_overbroad or args.strict):
         ProblemVault.set_tolerances(TOLERANCE_FNS)
 
     # 3) Go through all the files and report problems if they are not exceptions
@@ -234,10 +234,10 @@ variable.
 """.format(found_new_issues, exceptions_file)
         print(new_issues_str)
 
-    if args.list_overstrict:
+    if args.list_overbroad:
         def k_fn(tup):
             return tup[0].key()
-        for (ex,p) in sorted(ProblemVault.list_overstrict_exceptions(), key=k_fn):
+        for (ex,p) in sorted(ProblemVault.list_overbroad_exceptions(), key=k_fn):
             if p is None:
                 print(ex, "->", 0)
             else:
index d09e94151823c9fc4c6cbd286a123e192022b697..73519d446fb1e705b545201930dd642f04327d8b 100644 (file)
@@ -82,7 +82,7 @@ class ProblemVault(object):
 
         return status
 
-    def list_overstrict_exceptions(self):
+    def list_overbroad_exceptions(self):
         """Return an iterator of tuples containing (ex,prob) where ex is an
            exceptions in this vault that are stricter than it needs to be, and
            prob is the worst problem (if any) that it covered.