changeset 33681:c425b678df7c

py3: use open() instead of file() constructor The file() constructor has been removed in python 3.
author Pulkit Goyal <7895pulkit@gmail.com>
date Sat, 17 Jun 2017 17:16:28 +0530
parents 799db2af824c
children 3980b2e061f0
files tests/f
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/tests/f
+++ b/tests/f
@@ -51,7 +51,7 @@
             if opts.type:
                 facts.append('file')
             if opts.hexdump or opts.dump or opts.md5:
-                content = file(f, 'rb').read()
+                content = open(f, 'rb').read()
         elif islink:
             if opts.type:
                 facts.append('link')