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

[tor-commits] [ooni-probe/master] Import handleAllFailures and failureToString from ooni.errors



commit 08f87c126d122ad770142f4cfb9990dd6efeccbe
Author: Arturo Filastò <art@xxxxxxxxx>
Date:   Sat Jan 12 19:41:07 2013 +0100

    Import handleAllFailures and failureToString from ooni.errors
---
 nettests/blocking/tcpconnect.py |    2 +-
 ooni/templates/dnst.py          |    4 +++-
 ooni/templates/httpt.py         |    2 +-
 ooni/templates/tcpt.py          |    3 ++-
 4 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/nettests/blocking/tcpconnect.py b/nettests/blocking/tcpconnect.py
index b444c3b..3b22427 100644
--- a/nettests/blocking/tcpconnect.py
+++ b/nettests/blocking/tcpconnect.py
@@ -6,7 +6,7 @@ from twisted.internet.error import ConnectionRefusedError
 from twisted.internet.error import TCPTimedOutError, TimeoutError
 
 from ooni import nettest
-from ooni.nettest import handleAllFailures
+from ooni.errors import handleAllFailures
 from ooni.utils import log
 
 class TCPFactory(Factory):
diff --git a/ooni/templates/dnst.py b/ooni/templates/dnst.py
index 08d660a..243e63f 100644
--- a/ooni/templates/dnst.py
+++ b/ooni/templates/dnst.py
@@ -11,7 +11,9 @@ from twisted.names.client import Resolver
 from twisted.names.error import DNSQueryRefusedError
 
 from ooni.utils import log
-from ooni.nettest import NetTestCase, failureToString
+from ooni.nettest import NetTestCase
+from ooni.errors import failureToString
+
 from socket import gaierror
 
 
diff --git a/ooni/templates/httpt.py b/ooni/templates/httpt.py
index a265f4c..548c766 100644
--- a/ooni/templates/httpt.py
+++ b/ooni/templates/httpt.py
@@ -18,7 +18,7 @@ from ooni import config
 from ooni.utils.net import BodyReceiver, StringProducer, userAgents
 
 from ooni.utils.txagentwithsocks import Agent, TrueHeaders
-from ooni.nettest import handleAllFailures
+from ooni.errors import handleAllFailures
 
 
 class InvalidSocksProxyOption(Exception):
diff --git a/ooni/templates/tcpt.py b/ooni/templates/tcpt.py
index 323ead8..df63103 100644
--- a/ooni/templates/tcpt.py
+++ b/ooni/templates/tcpt.py
@@ -2,7 +2,8 @@ from twisted.internet import protocol, defer, reactor
 from twisted.internet.error import ConnectionDone
 from twisted.internet.endpoints import TCP4ClientEndpoint
 
-from ooni.nettest import NetTestCase, failureToString
+from ooni.nettest import NetTestCase
+from ooni.errors import failureToString
 from ooni.utils import log
 
 class TCPSender(protocol.Protocol):



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