commit 13c7ba31fe59ee00df271e690b931a2f80944060 Author: Arturo Filastò hellais@gmail.com Date: Tue Feb 7 22:18:45 2012 +0100
Add conditional import for scapy --- refactor/tests/traceroute.py | 8 ++++++-- 1 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/refactor/tests/traceroute.py b/refactor/tests/traceroute.py index 69f87e5..d7e722a 100644 --- a/refactor/tests/traceroute.py +++ b/refactor/tests/traceroute.py @@ -1,11 +1,15 @@ try: from dns import resolver except: - print "Error dnspython is not installed (http://www.dnspython.org/)" + print "Error: dnspython is not installed (http://www.dnspython.org/)" import gevent import os import plugoo -import scapy + +try: + import scapy +except: + print "Error: traceroute plugin requires scapy to be installed (http://www.secdev.org/projects/scapy)"
from plugoo import Plugoo, Asset
tor-commits@lists.torproject.org