From 591797e6a5e503a176d122f213c64d55fda3cf03 Mon Sep 17 00:00:00 2001 From: Martin Panter Date: Wed, 12 Feb 2014 02:43:19 +0000 Subject: [PATCH] Avoid BytesWarning in debugging messages in Python 3 --- elftools/elf/sections.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 -- 2.30.2