clalancette / pycdlib

Python library to read and write ISOs
GNU Lesser General Public License v2.1
143 stars 38 forks source link

log warning instead of throwing exception #85

Closed huettenhain closed 2 years ago

huettenhain commented 2 years ago

See #82.

clalancette commented 2 years ago

Excellent, thanks for this!

I started to take a look at how to write a test for this. What I did was to use genisoimage to create a valid UDF ISO, and then I used open/write to make just the first byte of the section in question invalid. In theory that should trigger this problem, but then I ran into the problem that doing that invalidates the checksum of the whole block, which causes another exception. That leads me to wonder what the rest of the data in that section looks like.

When you get a chance, can you fetch the branch https://github.com/clalancette/pycdlib/tree/dump-file-set-and-term-data , and try to open one of the problematic ISOs that has this particular problem with it? After it runs, it should dump out a file called something like pycdlib-extent-526336.data, which will just contain a small amount of data. If you could attach that here (or email that to me), I can take a look.

huettenhain commented 2 years ago

Of course! This is the result: pycdlib-extent-542720.data.zip I should note that the current PR does not completely fix any of the problems completely, I am just going through the commits in my own branch step by step, and this PR is one required modification.

huettenhain commented 2 years ago

Just to check; what is blocking this PR? There are a few more exceptions that I would have suggested to convert to logger warnings, but of course only if this is something that you can generally agree with.

clalancette commented 2 years ago

Just to check; what is blocking this PR?

Sorry, lack of time for me to look into it lately. I'll try to give it a bit of attention this week.

huettenhain commented 2 years ago

Oh I didn't mean it that way, lack of time is something I can very much relate to - I just wanted to make sure I wasn't blocking it.

huettenhain commented 2 years ago

Hey @clalancette, thanks for having a look at this! I merged your PR as requested.