Change-Id: Ibcce194b1905f0e7f29aa91fd0ff881ba879ad51
Signed-off-by: Jason Lowe-Power <jason@lowepower.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/29068
Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
# if a first line was not provided but the file is ok to open,
# grab the first line of the file.
if firstline is None and openok:
- handle = file(filename, 'r')
+ handle = open(filename, 'r')
firstline = handle.readline()
handle.close()
mode = 'r+'
else:
mode = 'r'
- src = file(src, mode)
+ src = open(src, mode)
orig_lines = []
elif isinstance(dst, str):
# if we're not updating in place and a destination file name
# was provided, create a file object
- dst = file(dst, 'w')
+ dst = open(dst, 'w')
for line in new_lines:
dst.write(line)