[tor-commits] [sbws/master] Revert "Exit on OSError when building circuit"

pastly at torproject.org pastly at torproject.org
Wed Sep 5 19:44:55 UTC 2018


commit c1a6eb9d21d340e23d725dbb73c3ac52f9c940cb
Author: juga0 <juga at riseup.net>
Date:   Sat Aug 4 05:17:53 2018 +0000

    Revert "Exit on OSError when building circuit"
    
    This reverts commit ede9feda3b6285c9e04a162dc393afa5e734d7e3.
    An exception trying to write to log file when there is not disk
    space can happen anywhere in the code
---
 sbws/core/scanner.py | 11 +----------
 1 file changed, 1 insertion(+), 10 deletions(-)

diff --git a/sbws/core/scanner.py b/sbws/core/scanner.py
index 8b13816..fa8cc88 100644
--- a/sbws/core/scanner.py
+++ b/sbws/core/scanner.py
@@ -201,16 +201,7 @@ def measure_relay(args, conf, destinations, cb, rl, relay):
     our_nick = conf['scanner']['nickname']
     circ_id = cb.build_circuit(circ_fps)
     if not circ_id:
-        try:
-            log.warning('Could not build circuit involving %s', relay.nickname)
-        except OSError as e:
-            # if the error is no space left (logging to file system)
-            # can not log the error, so print it
-            # this can happen in any log call, here would happen when measuring
-            # new relay starts
-            if e.code == 28:  # No space left on device
-                print("ERROR: " + str(e))
-                exit(1)
+        log.warning('Could not build circuit involving %s', relay.nickname)
         msg = 'Unable to complete circuit'
         return [
             ResultErrorCircuit(relay, circ_fps, dest.url, our_nick, msg=msg),





More information about the tor-commits mailing list