From 3f0ae664faf33578515ffa1fd5287ad692f16c6f Mon Sep 17 00:00:00 2001 From: Benoît Ganne Date: Wed, 9 Sep 2020 12:50:07 +0200 Subject: build: fix build for Debian 9 and Debian 10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Type: fix Change-Id: Ic07d0ae313b32e420ba93693cb75960a86f752a9 Signed-off-by: Benoît Ganne --- src/tools/vppapigen/vppapigen.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/tools/vppapigen') diff --git a/src/tools/vppapigen/vppapigen.py b/src/tools/vppapigen/vppapigen.py index 9d74a5b0357..bfc77ca7019 100755 --- a/src/tools/vppapigen/vppapigen.py +++ b/src/tools/vppapigen/vppapigen.py @@ -11,7 +11,7 @@ import os import sys from subprocess import Popen, PIPE -assert sys.version_info >= (3, 6), \ +assert sys.version_info >= (3, 5), \ "Not supported Python version: {}".format(sys.version) log = logging.getLogger('vppapigen') @@ -780,12 +780,13 @@ class VPPAPI(object): def parse_filename(self, filename, debug=0): if self.revision: - git_show = f'git show {self.revision}:{filename}' + git_show = 'git show {}:{}'.format(self.revision, filename) proc = Popen(git_show.split(), stdout=PIPE, encoding='utf-8') try: data, errs = proc.communicate() if proc.returncode != 0: - print(f'File not found: {self.revision}:{filename}', file=sys.stderr) + print('File not found: {}:{}'.format(self.revision, + filename), file=sys.stderr) sys.exit(2) return self.parse_string(data, debug=debug) except Exception as e: @@ -795,7 +796,7 @@ class VPPAPI(object): with open(filename, encoding='utf-8') as fd: return self.parse_fd(fd, None) except FileNotFoundError: - print(f'File not found: {filename}', file=sys.stderr) + print('File not found: {}'.format(filename), file=sys.stderr) sys.exit(2) def autoreply_block(self, name, parent): -- cgit 1.2.3-korg