[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [sbws/master] Check that there are results
commit f0ebf2702c3f1377abe6abf31afe66fa4991467f
Author: juga0 <juga@xxxxxxxxxx>
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()
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits