X-Git-Url: https://gerrit.fd.io/r/gitweb?p=csit.git;a=blobdiff_plain;f=resources%2Ftraffic_scripts%2Fipv4_ping_ttl_check.py;h=1286b468769c1e7a2ade7143469f86eff0cba543;hp=050a1d7b29dfaad3f6be80544b4a8a5ff4aabbd9;hb=refs%2Fchanges%2F97%2F297%2F1;hpb=33499c81c94c2d3baef9d3e9f061cd76ef86fa74 diff --git a/resources/traffic_scripts/ipv4_ping_ttl_check.py b/resources/traffic_scripts/ipv4_ping_ttl_check.py index 050a1d7b29..1286b46876 100755 --- a/resources/traffic_scripts/ipv4_ping_ttl_check.py +++ b/resources/traffic_scripts/ipv4_ping_ttl_check.py @@ -13,7 +13,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -from scapy.all import * +from scapy.all import Ether, IP, ICMP from resources.libraries.python.PacketVerifier \ import Interface, create_gratuitous_arp_request, auto_pad from optparse import OptionParser @@ -25,8 +25,8 @@ def check_ttl(ttl_begin, ttl_end, ttl_diff): if dst_if_defined: dst_if.close() raise Exception( - "TTL changed from {} to {} but decrease by {} expected")\ - .format(ttl_begin, ttl_end, hops) + "TTL changed from {} to {} but decrease by {} expected" + .format(ttl_begin, ttl_end, hops)) def ckeck_packets_equal(pkt_send, pkt_recv):