From: Martin Panter Date: Wed, 12 Feb 2014 02:43:19 +0000 (+0000) Subject: Avoid BytesWarning in debugging messages in Python 3 X-Git-Tag: v0.23~13^2 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=591797e6a5e503a176d122f213c64d55fda3cf03;p=pyelftools.git Avoid BytesWarning in debugging messages in Python 3 --- diff --git a/elftools/elf/sections.py b/elftools/elf/sections.py index ce62450..62ff019 100644 --- a/elftools/elf/sections.py +++ b/elftools/elf/sections.py @@ -77,9 +77,9 @@ class SymbolTableSection(Section): self.elfstructs = self.elffile.structs self.stringtable = stringtable elf_assert(self['sh_entsize'] > 0, - 'Expected entry size of section %s to be > 0' % name) + 'Expected entry size of section %r to be > 0' % name) elf_assert(self['sh_size'] % self['sh_entsize'] == 0, - 'Expected section size to be a multiple of entry size in section %s' % name) + 'Expected section size to be a multiple of entry size in section %r' % name) def num_symbols(self): """ Number of symbols in the table