[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [ooni-probe/master] Implement workaround to allow importing libdnet on debian
commit 4898ecb109180cb5596b0a1103ca3513b8ac98ae
Author: Arturo Filastò <art@xxxxxxxxx>
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 mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits