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

Close all output and log files explicitly #158

Open
boolean5 opened this issue Jul 17, 2020 · 0 comments
Open

Close all output and log files explicitly #158

boolean5 opened this issue Jul 17, 2020 · 0 comments
Labels

Comments

@boolean5
Copy link
Contributor

Currently, main() explicitly closes only the output and log file pair that corresponds to the last configuration section. This happens because close is called outside of the for loop that processes the configuration sections.

The rest of the files are most probably closed automatically because of CPython's reference counting. However, we should not rely on this, as it is an implementation detail specific to CPython and not a language feature.

I suggest moving the calls to close inside the for loop.

get_versioned_lists seems to be doing the same thing.

@HarshitSohaney HarshitSohaney added good first bug p2 Resolve soon p3 Backlog and removed p2 Resolve soon labels Aug 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants