[diffoscope] 01/02: Cleanup how arguments are given to readelf for sections

Jérémy Bobbio lunar at moszumanska.debian.org
Sat Jan 23 23:32:00 CET 2016


This is an automated email from the git hooks/post-receive script.

lunar pushed a commit to branch master
in repository diffoscope.

commit b0796344d77a74f43974456db3e08a4a0861ffb0
Author: Jérémy Bobbio <lunar at debian.org>
Date:   Sat Jan 23 22:27:25 2016 +0000

    Cleanup how arguments are given to readelf for sections
---
 diffoscope/comparators/elf.py | 13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)

diff --git a/diffoscope/comparators/elf.py b/diffoscope/comparators/elf.py
index 6a233f7..a7f6202 100644
--- a/diffoscope/comparators/elf.py
+++ b/diffoscope/comparators/elf.py
@@ -131,17 +131,16 @@ class ReadElfSection(Readelf):
         self._section_name = section_name
         super().__init__(path, *args, **kwargs)
 
-    def readelf_options(self):
-        return ['--decompress', '--hex-dump']
+    @property
+    def section_name(self):
+        return self._section_name
 
-    @tool_required('readelf')
-    def cmdline(self):
-        return ['readelf', '--wide'] + self.readelf_options() + \
-            [self._section_name, self.path]
+    def readelf_options(self):
+        return ['--decompress', '--hex-dump={}'.format(self.section_name)]
 
 class ReadelfStringSection(ReadElfSection):
     def readelf_options(self):
-        return ['--decompress', '--string-dump']
+        return ['--decompress', '--string-dump={}'.format(self.section_name)]
 
 class ObjdumpSection(Command):
     def __init__(self, path, section_name, *args, **kwargs):

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reproducible/diffoscope.git


More information about the diffoscope mailing list