aboutsummaryrefslogtreecommitdiffstats
path: root/src/tools
diff options
context:
space:
mode:
authorBenoît Ganne <bganne@cisco.com>2020-09-09 12:50:07 +0200
committerDamjan Marion <dmarion@me.com>2020-09-11 07:52:47 +0000
commit3f0ae664faf33578515ffa1fd5287ad692f16c6f (patch)
tree18b05164e2886020dd853b2559f13fb35eb4d8ab /src/tools
parent66bb7dd64ee2377103e18b96f1e6bf6405de44b5 (diff)
build: fix build for Debian 9 and Debian 10
Type: fix Change-Id: Ic07d0ae313b32e420ba93693cb75960a86f752a9 Signed-off-by: Benoît Ganne <bganne@cisco.com>
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):