Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[plugins,distros] Resolve code alerts for file not always closed #3360

Merged
merged 1 commit into from
Sep 23, 2023

Commits on Sep 22, 2023

  1. [plugins,distros] Resolve code alerts for file not always closed

    Fix a number of outstanding "File is not always closed" errors highlighted by
    GitHub's code scanning.
    
    This involves (almost exclusively) changing such as:
    
       for line in open('/some/file', 'r').read().splitlines():
    
    To using a context manager to ensure the file is always closed:
    
       with open('/some/file', 'r') as sfile:
           for line in sfile.read().splitlines():
    
    ...or something similar. Overall the logic of what a specific block of code was
    doing (mostly in plugins) is not changed however.
    
    Signed-off-by: Jake Hunsaker <[email protected]>
    TurboTurtle committed Sep 22, 2023
    Configuration menu
    Copy the full SHA
    025e0ba View commit details
    Browse the repository at this point in the history