[diffoscope] [PATCH] Implement ElfFile as a container of sections

Jérémy Bobbio lunar at debian.org
Mon Jan 18 19:03:07 CET 2016

> This works perfectly :) I've implemented it in the revision I'm attaching.
> Let me know what you think.

Commited. Many thanks! This fixes Debian #808197.

I just made a tiny change:

> +class ElfContainer(Container):
> +    _sec_types = {'X': ElfCodeSection, 'S': ElfStringSection, '_': ElfSection}

This is a constant, so I've renamed this to `SECTION_TYPES`.

> +                type = [self._sec_types[type] for type in flag if \
> +                        type in self._sec_types][0]

Even if it works, I think using `self` here is misleading as we are
using a class constant. I've replaced it with `ElfContainer`.

Lunar                                .''`. 
lunar at debian.org                    : :Ⓐ  :  # apt-get install anarchism
                                    `. `'` 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.reproducible-builds.org/pipermail/diffoscope/attachments/20160118/3d2074b8/attachment.sig>

More information about the diffoscope mailing list