aboutsummaryrefslogtreecommitdiff
path: root/scripts/maint/practracker/problem.py
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2019-03-25 16:06:26 -0400
committerNick Mathewson <nickm@torproject.org>2019-03-25 16:09:11 -0400
commitc2643842a9a93f131f7b1244cce253be657acc8f (patch)
treec747150672829b2c19290825b96df929f8c73c3f /scripts/maint/practracker/problem.py
parent0260e0f6fc46cd196c59d3d2c4551be2f15a7547 (diff)
downloadtor-c2643842a9a93f131f7b1244cce253be657acc8f.tar.gz
tor-c2643842a9a93f131f7b1244cce253be657acc8f.zip
practracker: add ability to regenerate exceptions file.
Also add a useful argument parser.
Diffstat (limited to 'scripts/maint/practracker/problem.py')
-rw-r--r--scripts/maint/practracker/problem.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/scripts/maint/practracker/problem.py b/scripts/maint/practracker/problem.py
index d5ebedd17f..c82c5db572 100644
--- a/scripts/maint/practracker/problem.py
+++ b/scripts/maint/practracker/problem.py
@@ -19,10 +19,13 @@ class ProblemVault(object):
found in the code, and also the old problems we read from the exception
file.
"""
- def __init__(self, exception_fname):
+ def __init__(self, exception_fname=None):
# Exception dictionary: { problem.key() : Problem object }
self.exceptions = {}
+ if exception_fname == None:
+ return
+
try:
with open(exception_fname, 'r') as exception_f:
self.register_exceptions(exception_f)