From 7c95d44a0e28aa8687ab51d1fe7f8b1e04226923 Mon Sep 17 00:00:00 2001 From: "Frank Ch. Eigler" Date: Thu, 11 Jun 2020 10:35:28 -0400 Subject: [PATCH] docs generator: tweak for python3 --- scripts/update-syscall-docs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/scripts/update-syscall-docs b/scripts/update-syscall-docs index 9140e1003..d1f23bb09 100755 --- a/scripts/update-syscall-docs +++ b/scripts/update-syscall-docs @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#! /usr/bin/python3 import os import sys @@ -62,8 +62,8 @@ def execShellCmd(cmd): p = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE) out, err = p.communicate() - sys.stderr.write(err) - return [line for line in out.split('\n') if line] + sys.stderr.write(str(err)) + return [line for line in str(out).split('\n') if line] def getSyscallsList(output_type): cmd = ['stap', '-L', 'nd_syscall.*'] @@ -94,18 +94,18 @@ def getSyscallsList(output_type): def main(): xmlfile = os.path.join(DESTDIR, 'syscalls.xmlpart') - print "Re-generating {0}...".format(xmlfile) + print ("Re-generating {0}...".format(xmlfile)) xml = open(xmlfile, 'w') xml.write(getXmlContent(getSyscallsList("xml"))) xml.close() manfile = os.path.join(DESTDIR, 'syscalls.3stap') - print "Re-generating {0}...".format(manfile) + print ("Re-generating {0}...".format(manfile)) man = open(manfile, 'w') man.write(getManContent(getSyscallsList("man"))) man.close() - print "Done." + print ("Done.") if __name__ == "__main__": main() -- 2.43.5