Closed rawrgulmuffins closed 6 years ago
Thanks Alex for the bug report. I think this may be related to the change to execute multiple linters in parallel. So, it could be a race condition in which two linters are trying to save some output.
In python 3 os.makedirs
accepts the argument exist_ok
, but that's not supported in python 2.7.
Probably the cleanest solution would be to use pathlib2 as explained in this answer https://stackoverflow.com/a/45547008/1413687.
Thanks for the quick reply. Also, yeah we're still using 2.7. =(
Another alternative is to catch the exception at this line rather than doing an if check. No race condition that way.
I'll go submit a PR for it
Edit: Should have read the SO link before making a PR. =P
I'll go use Pathlib instead of OSError
catching.
@sk- Added the Pathlib solution you suggested.
Current Behavior
Expected Behavior
Git lint should skip then creation step
git-lint version