empty `event_name' causes premature failure

Bug #769962 reported by Mark Williams
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
epgsnoop
Fix Committed
Low
hads

Bug Description

epgsnoop fails with the following exception:

+------
Traceback (most recent call last):
  File "/home/mark/bin/epgsnoop", line 183, in <module>
    programs = snooper.snoop()
  File "/home/mark/lib/python2.6/site-packages/epgsnoop/snooper.py", line 157, in snoop
    found = self.processPacket(pkt)
  File "/home/mark/lib/python2.6/site-packages/epgsnoop/snooper.py", line 80, in processPacket
    event['title'] = self.detail_regex.findall(data)[0].decode('latin-1')
IndexError: list index out of range
+------

... which I think is caused by a UK EIT stream where dvbsnoop outputs the following:

+------
            DVB-DescriptorTag: 77 (0x4d) [= short_event_descriptor]
            descriptor_length: 5 (0x05)
              ISO639_2_language_code: EST
            event_name_length: 0 (0x00)
            event_name: ""
            text_length: 0 (0x00)
            text_char: ""

            DVB-DescriptorTag: 77 (0x4d) [= short_event_descriptor]
            descriptor_length: 104 (0x68)
              ISO639_2_language_code: eng
            event_name_length: 27 (0x1b)
            event_name: "Overnights with Gareth John" -- Charset: Latin alphabet
            text_length: 72 (0x48)
            text_char: "Gareth gets you through the wee small hours with even More Music Variety" -- Charset: Latin alphabet
+------

The `event_name' line does not have `-- Charset' part for the empty [Estonian!] short event descriptor. The attached patch appears to stop the exception, although I do not know whether it is the correct way to handle such output from dvbsnoop or whether these short event descriptors could occur in a different order, etc.

Revision history for this message
Mark Williams (mark-aziraphale) wrote :
hads (hads)
Changed in epgsnoop:
status: New → In Progress
assignee: nobody → hads (hads)
importance: Undecided → Low
Revision history for this message
hads (hads) wrote :

Thanks very much. I just pushed revision 68 with a slightly changed version of your patch.

Changed in epgsnoop:
status: In Progress → Fix Committed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.