utils.archive: Properly close the opened file
On python3 this naked open reports ResourceWarning. Let's properly close
it:
avocado/utils/archive.py:191: ResourceWarning: unclosed file
<_io.TextIOWrapper name='/tmp/avocado___main__rv2ihor0/tmp0drzyrsb/
link_to_file2' mode='r' encoding='UTF-8'>
src = open(dst, 'r').read()
Signed-off-by: NLukáš Doktor <ldoktor@redhat.com>
Showing
想要评论请 注册 或 登录