-
Notifications
You must be signed in to change notification settings - Fork 6
Description
I've been digging through mkconcore.py and concore.py, and I noticed we're opening a lot of files without context managers (with statements). While CPython's GC usually handles cleanup, it's not guaranteed and can lead to file descriptor leaks, especially during complex I/O operations or if the script crashes.
Also, there are several except: blocks that catch everything (including KeyboardInterrupt and SystemExit). This makes debugging a pain because you can't easily kill the process if it hangs in a loop, and it masks actual errors we might want to see.
I'd like to refactor these file operations to use with open(...) as f: and narrow down the exception handling to specific errors like IOError or FileNotFoundError. It's a bit of housekeeping but will make the codebase much more robust.