From patchwork Fri Mar 25 04:58:30 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: readlink.py: use absolute_import, print_function From: roby roby X-Patchwork-Id: 14067 Message-Id: To: mercurial-devel@mercurial-scm.org Date: Fri, 25 Mar 2016 06:58:30 +0200 # HG changeset patch # User Robert Stanca # Date 1458881547 -7200 # Fri Mar 25 06:52:27 2016 +0200 # Node ID 4d056674733ef697f08301412ce8a07504484184 # Parent a6146f7e27f8a9875c34d746d7dc87b74dac1c6d readlink.py: use absolute_import, print_function diff -r a6146f7e27f8 -r 4d056674733e tests/readlink.py --- a/tests/readlink.py Fri Mar 25 06:47:34 2016 +0200 +++ b/tests/readlink.py Fri Mar 25 06:52:27 2016 +0200 @@ -1,13 +1,16 @@ #!/usr/bin/env python -import errno, os, sys +from __future__ import absolute_import , print_function +import errno +import os +import sys for f in sys.argv[1:]: try: - print f, '->', os.readlink(f) + print (f, '->', os.readlink(f)) except OSError as err: if err.errno != errno.EINVAL: raise - print f, 'not a symlink' + print (f, 'not a symlink') sys.exit(0) diff -r a6146f7e27f8 -r 4d056674733e tests/test-check-py3-compat.t --- a/tests/test-check-py3-compat.t Fri Mar 25 06:47:34 2016 +0200 +++ b/tests/test-check-py3-compat.t Fri Mar 25 06:52:27 2016 +0200 @@ -52,8 +52,6 @@ tests/md5sum.py not using absolute_import tests/mockblackbox.py not using absolute_import tests/printenv.py not using absolute_import - tests/readlink.py not using absolute_import - tests/readlink.py requires print_function tests/revlog-formatv0.py not using absolute_import tests/run-tests.py not using absolute_import tests/seq.py not using absolute_import