commit 4898ecb109180cb5596b0a1103ca3513b8ac98ae Author: Arturo Filastò art@fuffa.org Date: Sun Jan 12 15:40:48 2014 +0100
Implement workaround to allow importing libdnet on debian --- ooni/utils/txscapy.py | 6 ++++++ 1 file changed, 6 insertions(+)
diff --git a/ooni/utils/txscapy.py b/ooni/utils/txscapy.py index ae33365..876555b 100644 --- a/ooni/utils/txscapy.py +++ b/ooni/utils/txscapy.py @@ -31,6 +31,12 @@ def pcapdnet_installed(): False if one of the two is absent """ + # In debian libdnet is called dumbnet instead of dnet, but scapy is + # expecting "dnet" so we try and import it under such name. + try: + import dumbnet as dnet + except ImportError: pass + try: conf.use_pcap = True conf.use_dnet = True
tor-commits@lists.torproject.org