py3: use open() instead of file() constructor

The file() constructor has been removed in python 3.
This commit is contained in:
Pulkit Goyal 2017-06-17 17:16:28 +05:30
parent 43464e00e4
commit fff4a98b2d

View File

@ -51,7 +51,7 @@ def visit(opts, filenames, outfile):
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')