[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [nyx/master] Make reset_listener methods private
commit 1d8714a2b6805282f2d61fc4854f6f91a779c601
Author: Damian Johnson <atagar@xxxxxxxxxxxxxx>
Date: Thu Jul 28 09:48:35 2016 -0700
Make reset_listener methods private
No reason for these to be public. They're just used for our add_listener()
call.
---
nyx/panel/header.py | 4 ++--
nyx/panel/torrc.py | 6 +++---
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/nyx/panel/header.py b/nyx/panel/header.py
index f08afd7..da13ff3 100644
--- a/nyx/panel/header.py
+++ b/nyx/panel/header.py
@@ -53,7 +53,7 @@ class HeaderPanel(nyx.panel.DaemonPanel):
self._message = None
self._message_attr = []
- tor_controller().add_status_listener(self.reset_listener)
+ tor_controller().add_status_listener(self._reset_listener)
def show_message(self, message = None, *attr, **kwargs):
"""
@@ -180,7 +180,7 @@ class HeaderPanel(nyx.panel.DaemonPanel):
_draw_status(subwindow, 0, self.get_height() - 1, nyx_controller.is_paused(), self._message, *self._message_attr)
- def reset_listener(self, controller, event_type, _):
+ def _reset_listener(self, controller, event_type, _):
self._update()
if event_type == stem.control.State.CLOSED:
diff --git a/nyx/panel/torrc.py b/nyx/panel/torrc.py
index 374d86c..0bdaf2c 100644
--- a/nyx/panel/torrc.py
+++ b/nyx/panel/torrc.py
@@ -47,10 +47,10 @@ class TorrcPanel(panel.Panel):
self._torrc_load_error = None
controller = tor_controller()
- controller.add_status_listener(self.reset_listener)
- self.reset_listener(controller, State.RESET, None)
+ controller.add_status_listener(self._reset_listener)
+ self._reset_listener(controller, State.RESET, None)
- def reset_listener(self, controller, event_type, _):
+ def _reset_listener(self, controller, event_type, _):
"""
Reloads and displays the torrc on tor reload (sighup) events.
"""
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits