pylint #17874 check for mkstemp potential bugs [open]
could pylint be used to check for problems with mkstemp ? See http://www.logilab.org/blogentry/17873 It could be as simple as "the first item returned by mkstemp was not referenced after the call, you could be leaking file descriptors" and the check would be similar to the existing "this argument is not used". | |
priority | minor |
---|---|
type | enhancement |
done in | <not specified> |
closed by | <not specified> |
similar entities
- pylint #19799 "pylint -blah" exit with status 2
- pylint #5977 yield != return
- pylint #4983 new py2.5 check: test "yield" in "try" body with yield in exception handlers.
- pylint #4778 install multiple pylint executable for each available python version
- pylint #4018 option to specify a directory when using file-output option
[see all]
Comments
-
2009/09/10 14:45
add commentif the first element is not used it's not a "could" : the leak is there (abd imo it should be an Error-level message)
Also check for filename=tempfile.mkstemp()[1] which leaks too.
Bonus points if no warning when os.close(fd) or file = os.fdopen(fd) is used (in which case we are sure that no leak will occur).