Changeset 898:8679088c941f

Show
Ignore:
Timestamp:
08/31/08 00:34:14 (4 months ago)
Author:
Phil <phil@secdev.org>
Message:

Replaced RuntimeWarning? with Scapy_Exception

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • scapy/utils.py

    r897 r898  
    454454            self.endian = "<" 
    455455        else: 
    456             raise RuntimeWarning, "Not a pcap capture file (bad magic)" 
     456            raise Scapy_Exception("Not a pcap capture file (bad magic)") 
    457457        hdr = self.f.read(20) 
    458458        if len(hdr)<20: 
    459             raise RuntimeWarning, "Invalid pcap file (too short)" 
     459            raise Scapy_Exception("Invalid pcap file (too short)") 
    460460        vermaj,vermin,tz,sig,snaplen,linktype = struct.unpack(self.endian+"HHIIII",hdr) 
    461461