From 717abc99fb57f1005717304e36583acd62b01fb4 Mon Sep 17 00:00:00 2001 From: Jussi Pakkanen Date: Sat, 9 May 2015 13:38:49 +0300 Subject: [PATCH] Ignore non-elf files in depfixer. --- depfixer.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/depfixer.py b/depfixer.py index 0d61d5384..8db7ab62f 100755 --- a/depfixer.py +++ b/depfixer.py @@ -113,8 +113,10 @@ class Elf(): def detect_elf_type(self): data = self.bf.read(6) if data[1:4] != b'ELF': + # This script gets called to non-elf targets too + # so just ignore them. print('File "%s" is not an ELF file.' % self.bfile) - sys.exit(1) + sys.exit(0) if data[4] == 1: ptrsize = 32 elif data[4] == 2: