depfixer: f-strings

pull/9396/head
Zbigniew Jędrzejewski-Szmek 3 years ago
parent f48d75dcae
commit da522efc93
  1. 6
      mesonbuild/scripts/depfixer.py

@ -175,20 +175,20 @@ class Elf(DataSizes):
# This script gets called to non-elf targets too # This script gets called to non-elf targets too
# so just ignore them. # so just ignore them.
if self.verbose: if self.verbose:
print('File "%s" is not an ELF file.' % self.bfile) print(f'File {self.bfile!r} is not an ELF file.')
sys.exit(0) sys.exit(0)
if data[4] == 1: if data[4] == 1:
ptrsize = 32 ptrsize = 32
elif data[4] == 2: elif data[4] == 2:
ptrsize = 64 ptrsize = 64
else: else:
sys.exit('File "%s" has unknown ELF class.' % self.bfile) sys.exit(f'File {self.bfile!r} has unknown ELF class.')
if data[5] == 1: if data[5] == 1:
is_le = True is_le = True
elif data[5] == 2: elif data[5] == 2:
is_le = False is_le = False
else: else:
sys.exit('File "%s" has unknown ELF endianness.' % self.bfile) sys.exit(f'File {self.bfile!r} has unknown ELF endianness.')
return ptrsize, is_le return ptrsize, is_le
def parse_header(self) -> None: def parse_header(self) -> None:

Loading…
Cancel
Save