grc icon indicating copy to clipboard operation
grc copied to clipboard

use context manager to open files

Open bretello opened this issue 4 years ago • 0 comments

By not using the context manager, the files were never closed, resulting in the following warnings:

sys:1: ResourceWarning: unclosed file <_io.TextIOWrapper name='/usr/share/grc/conf.env' mode='r' encoding='UTF-8'>                                                                                             
sys:1: ResourceWarning: unclosed file <_io.TextIOWrapper name='/etc/grc.conf' mode='r' encoding='UTF-8'>

bretello avatar Feb 24 '22 10:02 bretello