mirror of
https://github.com/facebook/sapling.git
synced 2024-10-06 23:07:18 +03:00
py3: use open() instead of file() constructor
The file() constructor has been removed in python 3.
This commit is contained in:
parent
43464e00e4
commit
fff4a98b2d
2
tests/f
2
tests/f
@ -51,7 +51,7 @@ def visit(opts, filenames, outfile):
|
|||||||
if opts.type:
|
if opts.type:
|
||||||
facts.append('file')
|
facts.append('file')
|
||||||
if opts.hexdump or opts.dump or opts.md5:
|
if opts.hexdump or opts.dump or opts.md5:
|
||||||
content = file(f, 'rb').read()
|
content = open(f, 'rb').read()
|
||||||
elif islink:
|
elif islink:
|
||||||
if opts.type:
|
if opts.type:
|
||||||
facts.append('link')
|
facts.append('link')
|
||||||
|
Loading…
Reference in New Issue
Block a user