replace cdrdao.py with much simpler version #52
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Completely replace program/cdrdao.py with a much simpler implementation that does not parse the stdout & stderr output of cdrdao, but merely reads the resultant toc/cue file. As far as I could tell, the existant output-parsing code was only used for error checking, and as we saw was incomplete and incorrect.
I have wrapped the simpler version with functions of the same name as the previous version's classes to minimise the amount of main-program style changes before a general cleanup/refactor. However, the previous classes needed to be 'run' by the task scheduler and my version simply returns the needed image.toc.TocFile, so I removed the relevant task running code as well.
This should fix #49 by way of not failing out unless cdrdao returns non-zero or creates an invalid toc/cue.
The current test infrastructure is non-conducive to actually running a command (nor did it actually test this before), and short of major test restructuring there are no substantial tests written for this patch.