Skip to content

Commit bee4516

Browse files
committed
Intermediate changes
commit_hash:bbe5982909469ab84284cb16547e69a096d992ea
1 parent 064f972 commit bee4516

File tree

1 file changed

+4
-3
lines changed
  • library/python/testing/yatest_common/yatest/common

1 file changed

+4
-3
lines changed

library/python/testing/yatest_common/yatest/common/canonical.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,11 @@
1414

1515
def _copy(src, dst, universal_lines=False):
1616
if universal_lines:
17-
with open(dst, "wb") as f:
17+
with open(dst, "wb") as f_dst:
1818
mode = "rbU" if six.PY2 else "rb"
19-
for line in open(src, mode):
20-
f.write(line)
19+
with open(src, mode) as f_src:
20+
for line in f_src:
21+
f_dst.write(line)
2122
return
2223
shutil.copy(src, dst)
2324

0 commit comments

Comments
 (0)