[tor-commits] [nyx/master] Reload signals caught wrong exception type

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


commit 22c1ce6a0dcdde915f8347bfe60149e76cc1e37e
Author: Damian Johnson <atagar at torproject.org>
Date:   Fri Sep 9 10:59:43 2016 -0700

    Reload signals caught wrong exception type
    
    Stem's signal() method raises ControllerErrors, not IOErrors.
---
 nyx/controller.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/nyx/controller.py b/nyx/controller.py
index 00bd504..4a3825f 100644
--- a/nyx/controller.py
+++ b/nyx/controller.py
@@ -413,7 +413,7 @@ def start_nyx():
       if confirmation_key.match('x'):
         try:
           tor_controller().signal(stem.Signal.RELOAD)
-        except IOError as exc:
+        except stem.ControllerError as exc:
           log.error('Error detected when reloading tor: %s' % exc.strerror)
     elif key.match('h'):
       override_key = nyx.popups.show_help()





More information about the tor-commits mailing list