[tor-commits] [sbws/maint-1.1] fix: stem: Add possible exception cause

juga at torproject.org juga at torproject.org
Mon Jan 25 14:28:30 UTC 2021


commit cb6a8a76da0d77ef2896c9f99003649b3d43c1b4
Author: juga0 <juga at riseup.net>
Date:   Wed Dec 16 15:55:13 2020 +0000

    fix: stem: Add possible exception cause
---
 sbws/util/stem.py | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/sbws/util/stem.py b/sbws/util/stem.py
index 5605c29..ce5253c 100644
--- a/sbws/util/stem.py
+++ b/sbws/util/stem.py
@@ -181,9 +181,12 @@ def set_torrc_options_can_fail(controller):
     for k, v in TORRC_OPTIONS_CAN_FAIL.items():
         try:
             controller.set_conf(k, v)
-        except InvalidArguments as error:
+        except (InvalidArguments, InvalidRequest) as error:
             log.debug('Ignoring option not supported by this Tor version. %s',
                       error)
+        except ControllerError as e:
+            log.exception(e)
+            exit(1)
 
 
 def launch_tor(conf):





More information about the tor-commits mailing list