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

[tor-commits] [sbws/master] scanner: refactor, remove unneded line



commit c2d3bb98eb76eb15c1a7618993244225cbd03b9b
Author: juga0 <juga@xxxxxxxxxx>
Date:   Wed Dec 12 15:27:48 2018 +0000

    scanner: refactor, remove unneded line
---
 sbws/core/scanner.py | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/sbws/core/scanner.py b/sbws/core/scanner.py
index f6e226a..caf2aaa 100644
--- a/sbws/core/scanner.py
+++ b/sbws/core/scanner.py
@@ -40,9 +40,8 @@ def timed_recv_from_server(session, dest, byte_range):
     try:
         # headers are merged with the session ones, not overwritten.
         session.get(dest.url, headers=HTTP_GET_HEADERS, verify=dest.verify)
-    except requests.exceptions.ConnectionError as e:
-        return False, e
-    except requests.exceptions.ReadTimeout as e:
+    except (requests.exceptions.ConnectionError,
+            requests.exceptions.ReadTimeout) as e:
         return False, e
     end_time = time.time()
     return True, end_time - start_time



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