summaryrefslogtreecommitdiffstats
path: root/src/tools
diff options
context:
space:
mode:
authorBenoît Ganne <bganne@cisco.com>2020-09-09 12:50:07 +0200
committerAndrew Yourtchenko <ayourtch@gmail.com>2020-09-15 08:40:06 +0000
commit047eebfa976eb8c8fc3162c3ccdd5683d23452dc (patch)
tree6f51fd6aa9134aea793e61d14bd2a35f6f5c89e0 /src/tools
parent89bdb836f9c580b94119b4bff5ab20abd3bd94e5 (diff)
build: fix build for Debian 9 and Debian 10
Type: fix Change-Id: Ic07d0ae313b32e420ba93693cb75960a86f752a9 Signed-off-by: Benoît Ganne <bganne@cisco.com> (cherry picked from commit 3f0ae664faf33578515ffa1fd5287ad692f16c6f)
Diffstat (limited to 'src/tools')
-rwxr-xr-xsrc/tools/vppapigen/vppapigen.py9
1 files changed, 5 insertions, 4 deletions
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):