[tor-commits] [tor/master] practracker: Fix duplicate exceptions and handle them more "gracefully".

nickm at torproject.org nickm at torproject.org
Wed Mar 13 13:30:09 UTC 2019


commit 3e38efdf165098062972300687975c3372cec70e
Author: George Kadianakis <desnacked at riseup.net>
Date:   Wed Mar 13 12:59:44 2019 +0200

    practracker: Fix duplicate exceptions and handle them more "gracefully".
---
 scripts/maint/practracker/exceptions.txt | 1 -
 scripts/maint/practracker/problem.py     | 6 ++++++
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/scripts/maint/practracker/exceptions.txt b/scripts/maint/practracker/exceptions.txt
index 3fa68aff4..abe615f04 100644
--- a/scripts/maint/practracker/exceptions.txt
+++ b/scripts/maint/practracker/exceptions.txt
@@ -173,7 +173,6 @@ problem function-size /src/feature/hs/hs_client.c:send_introduce1() 104
 problem function-size /src/feature/hs/hs_client.c:hs_config_client_authorization() 108
 problem function-size /src/feature/hs/hs_config.c:config_generic_service() 149
 problem function-size /src/feature/hs/hs_cell.c:hs_cell_build_establish_intro() 115
-problem function-size /src/feature/hs/hs_cell.c:hs_cell_parse_introduce2() 147
 problem file-size /src/feature/hs/hs_descriptor.c 3108
 problem function-size /src/feature/hs/hs_descriptor.c:desc_encode_v3() 108
 problem function-size /src/feature/hs/hs_descriptor.c:decrypt_desc_layer() 110
diff --git a/scripts/maint/practracker/problem.py b/scripts/maint/practracker/problem.py
index 60ee3eb24..61420fb78 100644
--- a/scripts/maint/practracker/problem.py
+++ b/scripts/maint/practracker/problem.py
@@ -33,6 +33,12 @@ class ProblemVault(object):
             if problem is None:
                 continue
 
+            # Fail if we see dup exceptions. There is really no reason to have dup exceptions.
+            if problem.key() in self.exceptions:
+                print("Duplicate exceptions lines found in exception file:\n\t{}\n\t{}\nAborting...".format(problem, self.exceptions[problem.key()]),
+                      file=sys.stderr)
+                sys.exit(1)
+
             self.exceptions[problem.key()] = problem
             #print "Registering exception: %s" % problem
 





More information about the tor-commits mailing list