commit 3d8670523e9ef273336ccb94dfebc6bc32f286dc Author: Damian Johnson atagar@torproject.org Date: Sat Sep 21 17:06:59 2013 -0700
Removing unused REQ_EVENTS dict
Our old TorCtl-based codebase needed to play a funky dance to get the event types we needed, but also allow users to customize what they wanted for the log panel. Stem has a much better API in this reguard so we can just add separate listeners for both and it hanles the SETEVENT calls for us.
The REQ_EVENTS is legacy from those old, dark times. We no longer use it so it can be safely removed. --- arm/controller.py | 8 -------- arm/util/torTools.py | 6 ------ 2 files changed, 14 deletions(-)
diff --git a/arm/controller.py b/arm/controller.py index b6b1b9f..68b9146 100644 --- a/arm/controller.py +++ b/arm/controller.py @@ -514,12 +514,6 @@ def start_arm(start_time): :param float start_time: unix timestamp for when arm was started """
- # adds events needed for arm functionality to the torTools REQ_EVENTS - # mapping (they're then included with any setControllerEvents call, and log - # a more helpful error if unavailable) - - torTools.REQ_EVENTS["BW"] = "bandwidth graph won't function" - if not CONFIG["startup.blindModeEnabled"]: # The DisableDebuggerAttachment will prevent our connection panel from really # functioning. It'll have circuits, but little else. If this is the case then @@ -530,8 +524,6 @@ def start_arm(start_time): if controller.get_conf("DisableDebuggerAttachment", None) == "1": log.notice("Tor is preventing system utilities like netstat and lsof from working. This means that arm can't provide you with connection information. You can change this by adding 'DisableDebuggerAttachment 0' to your torrc and restarting tor. For more information see...\nhttps://trac.torproject.org/3313") connections.getResolver("tor").setPaused(True) - else: - torTools.REQ_EVENTS["CIRC"] = "may cause issues in identifying client connections"
# Configures connection resoultions. This is paused/unpaused according to # if Tor's connected or not. diff --git a/arm/util/torTools.py b/arm/util/torTools.py index 8c7631e..7c0a108 100644 --- a/arm/util/torTools.py +++ b/arm/util/torTools.py @@ -26,12 +26,6 @@ CONFIG = conf.config_dict("arm", { "tor.chroot": "", })
-# events used for controller functionality: -# NEWDESC, NS, and NEWCONSENSUS - used for cache invalidation -REQ_EVENTS = {"NEWDESC": "information related to descriptors will grow stale", - "NS": "information related to the consensus will grow stale", - "NEWCONSENSUS": "information related to the consensus will grow stale"} - # Logs issues and notices when fetching the path prefix if true. This is # only done once for the duration of the application to avoid pointless # messages.
tor-commits@lists.torproject.org