1
0
mirror of https://github.com/samba-team/samba.git synced 2025-08-02 00:22:11 +03:00

python: bulk replace file to open for py3

The builtin function `file` was removed in py3. Use `open` instead.

Signed-off-by: Joe Guo <joeg@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
This commit is contained in:
Joe Guo
2018-04-11 16:03:34 +12:00
committed by Douglas Bagnall
parent 9d79329d3d
commit 8432ca2b48
3 changed files with 5 additions and 5 deletions

View File

@ -79,7 +79,7 @@ class TestProtocolClient(unittest.TestResult):
suite = make_suite()
# Create a stream (any object with a 'write' method). This should accept
# bytes not strings: subunit is a byte orientated protocol.
stream = file('tests.log', 'wb')
stream = open('tests.log', 'wb')
# Create a subunit result object which will output to the stream
result = subunit.TestProtocolClient(stream)
# Optionally, to get timing data for performance analysis, wrap the