[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [nyx/master] ControllerError has no strerror attribute.



commit 8565384dc42b3f0faef027f890602b15513787be
Author: Rémi Oudin <oudin@xxxxxxxxx>
Date:   Wed Mar 14 10:54:11 2018 +0100

    ControllerError has no strerror attribute.
    
    Moreover, a more accurate handling of exceptions is performed.
---
 nyx/panel/config.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/nyx/panel/config.py b/nyx/panel/config.py
index af899b1..372ca66 100644
--- a/nyx/panel/config.py
+++ b/nyx/panel/config.py
@@ -218,8 +218,10 @@ class ConfigPanel(nyx.panel.Panel):
       try:
         controller.save_conf()
         show_message('Saved configuration to %s' % controller.get_info('config-file', '<unknown>'), HIGHLIGHT, max_wait = 2)
+      except stem.OperationFailed as exc:
+        show_message('Unable to save configuration ([%s] %s)' % (exc.code, exc.message), HIGHLIGHT, max_wait = 2)
       except stem.ControllerError as exc:
-        show_message('Unable to save configuration (%s)' % exc.strerror, HIGHLIGHT, max_wait = 2)
+        show_message('Unable to save configuration (%s)' % exc, HIGHLIGHT, max_wait = 2)
 
     self.redraw()
 



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits