Merge "update code to be python3-compatible"

This commit is contained in:
Zuul 2018-10-09 20:41:10 +00:00 committed by Gerrit Code Review
commit b6f9528161
3 changed files with 8 additions and 4 deletions

View File

@ -12,6 +12,8 @@
# License for the specific language governing permissions and limitations
# under the License.
from __future__ import print_function
import ast
import argparse
import importlib

View File

@ -57,7 +57,7 @@ if not isinstance(data, dict):
outFileName = 'doc/source/guidelines/' + inFileName.replace("json", "rst")
print ("Writing to: " + outFileName)
print("Writing to: " + outFileName)
# intro

View File

@ -14,6 +14,8 @@
# License for the specific language governing permissions and limitations
# under the License.
from __future__ import print_function
import re
import json
import argparse
@ -194,7 +196,7 @@ with open(args.score_file_name) as filehandle:
# And stdout is useful for folks who are experimenting with
# the effect of changing a score.
print "%s: %d%s" % (cap_name, total, meets_criteria)
print("%s: %d%s" % (cap_name, total, meets_criteria))
# Now we can write the text output file.
with open(args.text_outfile_name, 'w') as outfile:
@ -202,5 +204,5 @@ with open(args.text_outfile_name, 'w') as outfile:
outfile.write(line)
outfile.close()
print "\n\nText output has been written to %s" % args.text_outfile_name
print "CSV output has been written to %s" % args.csv_outfile_name
print("\n\nText output has been written to %s" % args.text_outfile_name)
print("CSV output has been written to %s" % args.csv_outfile_name)