[tor-commits] [nyx/master] Pressing 'x' to confirm reload didn't work

atagar at torproject.org atagar at torproject.org
Fri Sep 16 06:18:14 UTC 2016


commit 4c4f07704ed2832ea4fa022723fc36f46a9c1b09
Author: Damian Johnson <atagar at torproject.org>
Date:   Fri Sep 9 10:54:20 2016 -0700

    Pressing 'x' to confirm reload didn't work
    
    We expected the confirmation_key to be an integer but it was actually a
    KeyInput, causing the check to always evaluate to false.
---
 nyx/controller.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/nyx/controller.py b/nyx/controller.py
index bf7a22d..00bd504 100644
--- a/nyx/controller.py
+++ b/nyx/controller.py
@@ -410,7 +410,7 @@ def start_nyx():
       msg = "This will reset Tor's internal state. Are you sure (x again to confirm)?"
       confirmation_key = show_message(msg, BOLD, max_wait = 30)
 
-      if confirmation_key in (ord('x'), ord('X')):
+      if confirmation_key.match('x'):
         try:
           tor_controller().signal(stem.Signal.RELOAD)
         except IOError as exc:





More information about the tor-commits mailing list