[tor-commits] [ooni-probe/master] Add backward compatibility to whatsapp messenger test
art at torproject.org
art at torproject.org
Fri Jan 13 12:39:57 UTC 2017
commit 9e6d83211f68cf3474735daeecd76e5ddb270412
Author: Arturo Filastò <arturo at filasto.net>
Date: Wed Oct 12 17:53:58 2016 +0200
Add backward compatibility to whatsapp messenger test
---
ooni/nettests/blocking/facebook_messenger.py | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/ooni/nettests/blocking/facebook_messenger.py b/ooni/nettests/blocking/facebook_messenger.py
index 787d7ad..fd6441a 100644
--- a/ooni/nettests/blocking/facebook_messenger.py
+++ b/ooni/nettests/blocking/facebook_messenger.py
@@ -4,7 +4,12 @@ from twisted.internet import defer, reactor
from twisted.python import usage
from twisted.internet.endpoints import TCP4ClientEndpoint
-from ooni.geoip import ip_to_location
+try:
+ from ooni.geoip import ip_to_location
+except ImportError:
+ # Backward compatibility with 1.6.0
+ from ooni.geoip import IPToLocation as ip_to_location
+
from ooni.utils import log
from ooni.common.tcp_utils import TCPConnectFactory
from ooni.errors import failureToString
More information about the tor-commits
mailing list