aboutsummaryrefslogtreecommitdiffstats
path: root/extras/scripts
diff options
context:
space:
mode:
authorPaul Vinciguerra <pvinci@vinciconsulting.com>2019-07-02 17:37:46 -0400
committerDave Wallace <dwallacelf@gmail.com>2019-07-09 14:27:05 +0000
commit57783efb822699ee5acc637580ca855fb9b7e4cc (patch)
tree003eb9e0ed29c1008d53f385715930d02c02117e /extras/scripts
parentb3f58e1049ababf021a677595df49b0510e37279 (diff)
misc: extras update list_api_changes.py to PY3
Type: refactor Change-Id: I099d78393675b7aac37e89df98527c361054077b Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
Diffstat (limited to 'extras/scripts')
-rwxr-xr-xextras/scripts/list_api_changes.py25
1 files changed, 14 insertions, 11 deletions
diff --git a/extras/scripts/list_api_changes.py b/extras/scripts/list_api_changes.py
index 11150dccc36..ac8cf477810 100755
--- a/extras/scripts/list_api_changes.py
+++ b/extras/scripts/list_api_changes.py
@@ -1,5 +1,8 @@
-#!/usr/bin/env python
-import os, fnmatch, subprocess
+#!/usr/bin/env python3
+from __future__ import print_function
+import fnmatch
+import os
+import subprocess
starttag = 'v19.08-rc0'
endtag = 'HEAD'
@@ -18,16 +21,16 @@ for f in apifiles:
if f[0:2] == './':
f = f[2:]
if emit_md:
- print "| @c %s ||" % f
- print "| ------- | ------- |"
+ print("| @c %s ||" % f)
+ print("| ------- | ------- |")
for line in commits.splitlines():
parts = line.strip().split()
commit = parts[0]
- message = " ".join(parts[1:]).replace("|", "\|")
- print "| [%s](https://gerrit.fd.io/r/gitweb?" \
- "p=vpp.git;a=commit;h=%s) | %s |" % (
- commit, commit, message)
- print
+ message = b" ".join(parts[1:]).decode().replace("|", r"\|")
+ print("| [%s](https://gerrit.fd.io/r/gitweb?"
+ "p=vpp.git;a=commit;h=%s) | %s |" % (
+ commit, commit, message))
+ print()
else:
- print f
- print commits
+ print(f)
+ print(commits)