diff options
author | Krzysztof Gogolewski <krz.gogolewski@gmail.com> | 2014-10-04 20:05:08 +0200 |
---|---|---|
committer | Krzysztof Gogolewski <krz.gogolewski@gmail.com> | 2014-10-04 20:05:08 +0200 |
commit | b1aa203bb31a9c0edd3fe76b4d38ad7fce2b15f4 (patch) | |
tree | 98a658bb2f33cb9ba034c5369e6d2fc8231246c4 /utils/fingerprint/fingerprint.py | |
parent | 8d95768c80baf47526d08b89e3beba24233fb448 (diff) | |
download | haskell-wip/python3-new.tar.gz |
Restore Python 3 support (Trac #9184)wip/python3-new
This reverts commit e4a597f2f527ba0cd15cb51dda15cb51871c984e.
Conflicts:
testsuite/driver/testlib.py
Diffstat (limited to 'utils/fingerprint/fingerprint.py')
-rwxr-xr-x | utils/fingerprint/fingerprint.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/utils/fingerprint/fingerprint.py b/utils/fingerprint/fingerprint.py index 5738cda8cc..628e0c85bb 100755 --- a/utils/fingerprint/fingerprint.py +++ b/utils/fingerprint/fingerprint.py @@ -1,6 +1,8 @@ #! /usr/bin/env python # Script to create and restore a git fingerprint of the ghc repositories. +from __future__ import print_function + from datetime import datetime from optparse import OptionParser import os @@ -23,7 +25,7 @@ def create_action(opts): if len(fp) == 0: error("Got empty fingerprint from source: "+str(opts.source)) if opts.output_file: - print "Writing fingerprint to: ", opts.output_file + print("Writing fingerprint to: ", opts.output_file) fp.write(opts.output) def restore_action(opts): @@ -89,7 +91,7 @@ def restore(fp, branch_name=None): for (subdir, commit) in fp: if subdir != ".": cmd = checkout + [commit] - print "==", subdir, " ".join(cmd) + print("==", subdir, " ".join(cmd)) if os.path.exists(subdir): rc = subprocess.call(cmd, cwd=subdir) if rc != 0: @@ -184,7 +186,7 @@ def validate(opts, args, parser): def error(msg="fatal error", parser=None, exit=1): """Function that prints error message and exits""" - print "ERROR:", msg + print("ERROR:", msg) if parser: parser.print_help() sys.exit(exit) |