aboutsummaryrefslogtreecommitdiff
path: root/depfixer.py
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2015-05-09 13:38:49 +0300
committerJussi Pakkanen <jpakkane@gmail.com>2015-05-09 13:38:49 +0300
commit717abc99fb57f1005717304e36583acd62b01fb4 (patch)
tree2795389993a2df9f40b4cb9b6c8ef7e6f1224d36 /depfixer.py
parent8366ad1e4794ed052d8337f2bb813ca6145220ee (diff)
downloadmeson-717abc99fb57f1005717304e36583acd62b01fb4.zip
meson-717abc99fb57f1005717304e36583acd62b01fb4.tar.gz
meson-717abc99fb57f1005717304e36583acd62b01fb4.tar.bz2
Ignore non-elf files in depfixer.
Diffstat (limited to 'depfixer.py')
-rwxr-xr-xdepfixer.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/depfixer.py b/depfixer.py
index 0d61d53..8db7ab6 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: