[IniLCNScanner] Non-fatal exception when creating Terrestrial LCN TV bouquet

Issue #702 resolved
prl created an issue

At the end of a location scan for service, when OK is pressed, the Terrestrial LCN TV bouquet is created.

A bug was introduced in commit 6725b42 that means when LCNBuildHelper::readBouquetsList() is called, there's a caught exception

[LCNScanner] global name 'pwd' is not defined

caused for each FROM BOUQUET line in /etc/enigma2/bouquets.tv.

This is because the changes in the commit removed the pwd argument to LCNBuildHelper::readBouquetsList(), but left it in the open() calls for the files named in /etc/enigma2/bouquets.tv, which causes the exceptions.

The failure to read the files has no effect on the Beyonwiz code, because commit d6f865a removed any use of LCN().bouquetfile, which is the only place in the code where the results of the LCNBuildHelper::readBouquetsTvList() / LCNBuildHelper().bouquetlist /config.lcn.bouquet / LCN().bouquetfile mechanism were referenced.

I'm unsure whether the best fix is simply to fix the open() call's argument or whether the whole of the bouquet selection code should be stripped out, because it has been essentially dead code since commit d6f865a.

Replication steps

rm /media/hdd/logs/E*.log

Start a location scan using MENU>Setup>Tuners>Location scan.

Accept the scan results at the end of the scan with OK.

grep LCNScanner /media/hdd/logs/E*.log

There should be one

[LCNScanner] global name 'pwd' is not defined

line for each FROM BOUQUET line in /etc/enigma2/bouquets.tv.

Comments (5)

  1. IanSav

    If the code is effectively "dead" and not used then it would appear to be beneficial to declutter and clean up the remaining code.

  2. prl reporter

    That's my inclination, too. The code doesn't seem to have been modified by anyone other than the "usual suspects" and Paul darezik@gmail.com, who I think is from In&In, a Korean contractor used by Beyonwiz for some of the early development (and perhaps still used).

  3. Peter Urbanec

    Yes, kill the old code. Any code within the IniLCNScanner plugin is unlikely to have future merge conflicts or provide APIs to third party plugins.

  4. Peter Urbanec

    Fix Bug #702: [IniLCNScanner] Non-fatal exception when creating Terrestrial LCN TV bouquet

    Remove all of the code associated with selecting a bouquet in IniLCNScanner.

    The code is no longer used, and contained the cause of this bug.

    → <<cset 560449ba9308>>

  5. Log in to comment