[tor-commits] [sbws/master] Check that there are results

pastly at torproject.org pastly at torproject.org
Tue Jun 26 15:36:50 UTC 2018


commit f0ebf2702c3f1377abe6abf31afe66fa4991467f
Author: juga0 <juga at riseup.net>
Date:   Mon Jun 25 10:29:37 2018 +0000

    Check that there are results
    
    Check that there are results before trying to get the results
    for an specific relay. This would avoid raising TypeError
    when there are not results.
---
 sbws/lib/resultdump.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sbws/lib/resultdump.py b/sbws/lib/resultdump.py
index 755eb2d..2e51be9 100644
--- a/sbws/lib/resultdump.py
+++ b/sbws/lib/resultdump.py
@@ -497,7 +497,7 @@ class ResultDump:
         self.fresh_days = conf.getint('general', 'data_period')
         self.datadir = conf['paths']['datadir']
         self.end_event = end_event
-        self.data = None
+        self.data = {}
         self.data_lock = RLock()
         self.thread = Thread(target=self.enter)
         self.queue = Queue()





More information about the tor-commits mailing list