[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [tor-bugs] #4500 [TorDNSEL/TorBEL]: TorBEL does not check result from TorCtl.get_router
#4500: TorBEL does not check result from TorCtl.get_router
-----------------------------+----------------------------------------------
Reporter: aagbsn | Owner:
Type: defect | Status: needs_review
Priority: normal | Milestone:
Component: TorDNSEL/TorBEL | Version:
Keywords: | Parent:
Points: | Actualpoints:
-----------------------------+----------------------------------------------
Changes (by aagbsn):
* status: new => needs_review
Comment:
https://github.com/aagbsn/torbel/tree/4500-check-return-value
{{{
diff --git a/controller.py b/controller.py
index fe6dbf7..7bef189 100644
--- a/controller.py
+++ b/controller.py
@@ -647,10 +647,11 @@ class Controller(TorCtl.EventHandler):
try:
ns = self.conn.get_network_status("id/" + rid)[0]
router = self.conn.get_router(ns)
- self.add_to_cache(router)
- # Notify scheduler that a new router is available for
testing.
- if self.scheduler:
- self.scheduler.new_descriptor(router)
+ if router:
+ self.add_to_cache(router)
+ # Notify scheduler that a new router is available for
testing.
+ if self.scheduler:
+ self.scheduler.new_descriptor(router)
except TorCtl.ErrorReply, e:
log.error("NEWDESC: Controller error: %s", str(e))
}}}
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/4500#comment:1>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
_______________________________________________
tor-bugs mailing list
tor-bugs@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs