Changeset 5734

Show
Ignore:
Timestamp:
07/12/10 17:33:21 (3 years ago)
Author:
kosma
Message:

sniffing: check next() return value more carefully

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • umpa/branches/link-layer-integration/umit/umpa/sniffing/__init__.py

    r5702 r5734  
    9090        packet = session.next() 
    9191        # handle timeout 
    92         if packet is None: 
     92        if packet is None or packet[1] is None: 
    9393            break 
    9494        p = decode(packet[1], session.datalink()) 
     
    186186        packet = session.next() 
    187187        # handle timeout 
    188         if packet is None: 
     188        if packet is None or packet[1] is None: 
    189189            break 
    190190        ts, pkt = packet