persistent-evdev
persistent-evdev copied to clipboard
Caching capabilities doesnt check if directory exist
I love your tool but i found an (nitpicky) issue. when i misconfigured my config.json to use a directory that doesnt exist
"cache": "/doesnt/exist/cache"
this error occurs
File "/opt/persistent-evdev/bin/persistent-evdev.py", line 74, in save_capabilities
with open(capabilities_path, "w+") as file:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: '/doesnt/exist/cache/device.json'
it would be nice if
make_capabilities_path(self)
also check if the directory exist and if not it would create it