commit | d2ca1031708f717da7e8db5b05a87972a0a429a9 | [log] [tgz] |
---|---|---|
author | Dan Talayco <dtalayco@stanford.edu> | Wed Mar 10 14:40:26 2010 -0800 |
committer | Dan Talayco <dtalayco@stanford.edu> | Wed Mar 10 14:40:26 2010 -0800 |
tree | 6be35dcf9ae05fd5cbde36552cb86cf6a266a21a | |
parent | 0db53eb3dd0c33696698798244ca2f397b8b2ba8 [diff] [blame] |
As much as possible, remove dependence on python 2.5
diff --git a/tests/testutils.py b/tests/testutils.py index 6f8e0b4..df7831e 100644 --- a/tests/testutils.py +++ b/tests/testutils.py
@@ -1,5 +1,13 @@ -import scapy.all as scapy +import sys + +try: + import scapy.all as scapy +except: + try: + import scapy as scapy + except: + sys.exit("Need to install scapy for packet parsing") import oftest.controller as controller import oftest.cstruct as ofp