aboutsummaryrefslogtreecommitdiffstats
path: root/src/tools
diff options
context:
space:
mode:
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):