Explicitly use python3 for python scripts

Focal images do not provide 'python' anymore,
and this  means that those scripts are broken
in that environment without this change.

And make sure the scripts are really py3 compatible
(fix a buffering issue)

Change-Id: I652e5d007d5a606f0fe89ac6b3ea76f765be1ae4
This commit is contained in:
Luigi Toscano
2021-03-11 01:15:37 +01:00
parent 1cdbb71ffe
commit 62982b5a4e
2 changed files with 3 additions and 3 deletions

View File

@@ -1,4 +1,4 @@
#! /usr/bin/env python
#! /usr/bin/env python3
# Copyright 2016 Hewlett Packard Enterprise Development Company, L.P.
#

View File

@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
#
# Copyright 2014 Hewlett-Packard Development Company, L.P.
#
@@ -50,7 +50,7 @@ def main():
opts = get_options()
outfile = None
if opts.outfile:
outfile = open(opts.outfile, 'a', 0)
outfile = open(opts.outfile, 'a', buffering=1)
# otherwise fileinput reprocess args as files
sys.argv = []