comparison tests/f @ 32898: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 318534bb5dfd
children 3db2365d43e4
comparison
equal deleted inserted replaced
32897:799db2af824c 32898:c425b678df7c
49 facts = [] 49 facts = []
50 if isfile: 50 if isfile:
51 if opts.type: 51 if opts.type:
52 facts.append('file') 52 facts.append('file')
53 if opts.hexdump or opts.dump or opts.md5: 53 if opts.hexdump or opts.dump or opts.md5:
54 content = file(f, 'rb').read() 54 content = open(f, 'rb').read()
55 elif islink: 55 elif islink:
56 if opts.type: 56 if opts.type:
57 facts.append('link') 57 facts.append('link')
58 content = os.readlink(f) 58 content = os.readlink(f)
59 elif isstdin: 59 elif isstdin: