"OSError: [Errno 2] No such file or directory" when creating the store on disk
Closed this issue · 5 comments
moggers87 commented
https://github.com/xray7224/PyPump/blob/master/pypump/store.py#L186
This line can raise an OSError
with the rather cryptic message "[Errno 2] No such file or directory"
moggers87 commented
Looks like this error is raise when the parent dir (e.g. $HOME/.config
) doesn't exist
moggers87 commented
We will also get a different OSError
if we don't have permission to create the directory, however it's pretty clear on what the error was in that case.
kabniel commented
A quick fix for the first error would be to use the recursive os.makedirs
instead of os.mkdir
moggers87 commented
The second error is a little more obvious, so I don't think we should catch that one.
moggers87 commented
Test case done