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

[tor-commits] [sbws/maint-1.1] fix: resultdump: Check that the error has a circuit



commit e375cd28c8e19e3e9660547b134ef7759ad21e3f
Author: juga0 <juga@xxxxxxxxxx>
Date:   Tue Feb 9 10:42:34 2021 +0000

    fix: resultdump: Check that the error has a circuit
    
    Because if the error is not a circuit error, it does not have that
    attribute.
---
 sbws/lib/resultdump.py | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/sbws/lib/resultdump.py b/sbws/lib/resultdump.py
index 6673e9a..b287242 100644
--- a/sbws/lib/resultdump.py
+++ b/sbws/lib/resultdump.py
@@ -794,8 +794,9 @@ class ResultDump:
                     result.dest_url, result.msg)
         # The result doesn't store the exit policies, so it can't be logged
         # whether it was an exit.
-        as_exit = result.circ[1] == result.fingerprint
-        msg += ". As exit." if as_exit else ". As entry."
+        if result.circ:
+            as_exit = result.circ[1] == result.fingerprint
+            msg += ". As exit." if as_exit else ". As entry."
         # When the error is that there are not more functional destinations.
         if result.type == "error-destination":
             log.info("Shutting down because there are not functional "



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