Question: Internal PIP module logfile check #29470
Labels
Execution-Module
Feature
new functionality including changes to functionality and code refactors, etc.
Platform
Relates to OS, containers, platform-based utilities like FS, system based apps
Milestone
I was trying to fix another issue and I cam acrross this line [ https://github.com/saltstack/salt/blob/develop/salt/modules/pip.py#L530 ]
Let me put a small block of code here
I'm not a experience python developer, but os.path.exists() will return True or False but will not throw an exception in that context. Also log variable could be a directory, for example and I think is not something expected.
Please, be aware that I'm doing this just for fun and because I enjoy using Salt :)
I would try to do something like trying to open the file in write mode o using os.access to check permissions instead of the current implementation.
In any case, let me know and i will happy to submit a PR.
The text was updated successfully, but these errors were encountered: