[tor-commits] [doctor/master] Stacktrace when getting suppression durations

atagar at torproject.org atagar at torproject.org
Fri Aug 15 16:27:28 UTC 2014


commit f71c6784e697221d95ab71de6fa4a11d63485a5c
Author: Damian Johnson <atagar at torproject.org>
Date:   Fri Aug 15 09:27:51 2014 -0700

    Stacktrace when getting suppression durations
    
    Traceback (most recent call last):
      File "/srv/doctor.torproject.org/doctor/consensus_health_checker.py", line 638, in <module>
        main()
      File "/srv/doctor.torproject.org/doctor/consensus_health_checker.py", line 182, in main
        duration = issue.get_suppression_duration()
      File "/srv/doctor.torproject.org/doctor/stem/util/lru_cache.py", line 135, in wrapper
        result = user_function(*args, **kwds)
      File "/srv/doctor.torproject.org/doctor/consensus_health_checker.py", line 109, in get_suppression_duration
        elif self.get_runlevel() == Runlevel.WARN:
    AttributeError: 'Enum' object has no attribute 'WARN'
---
 consensus_health_checker.py |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/consensus_health_checker.py b/consensus_health_checker.py
index 2ce14a4..df827fb 100755
--- a/consensus_health_checker.py
+++ b/consensus_health_checker.py
@@ -106,7 +106,7 @@ class Issue(object):
 
     if self.get_runlevel() == Runlevel.NOTICE:
       return 24  # 1 day
-    elif self.get_runlevel() == Runlevel.WARN:
+    elif self.get_runlevel() == Runlevel.WARNING:
       return 4  # 4 hours
     else:
       return 0  # no suppression for errors



More information about the tor-commits mailing list