From 179f281a8c873a74bb2c3b4b98fd4b498599eb83 Mon Sep 17 00:00:00 2001 From: Phil <phil@secdev.org> Date: Sun, 31 Aug 2008 00:34:14 +0200 Subject: [PATCH] Replaced RuntimeWarning with Scapy_Exception --- scapy/utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scapy/utils.py b/scapy/utils.py index 99473bf6..0028a8ad 100644 --- a/scapy/utils.py +++ b/scapy/utils.py @@ -453,10 +453,10 @@ class RawPcapReader: elif magic == "\xd4\xc3\xb2\xa1": #little endian self.endian = "<" else: - raise RuntimeWarning, "Not a pcap capture file (bad magic)" + raise Scapy_Exception("Not a pcap capture file (bad magic)") hdr = self.f.read(20) if len(hdr)<20: - raise RuntimeWarning, "Invalid pcap file (too short)" + raise Scapy_Exception("Invalid pcap file (too short)") vermaj,vermin,tz,sig,snaplen,linktype = struct.unpack(self.endian+"HHIIII",hdr) self.linktype = linktype -- GitLab