diff --git a/daemons/lvmdbusd/utils.py b/daemons/lvmdbusd/utils.py index 27b869c..206d495 100644 --- a/daemons/lvmdbusd/utils.py +++ b/daemons/lvmdbusd/utils.py @@ -778,6 +778,7 @@ class LockFile(object): def __enter__(self): try: + os.makedirs(os.path.dirname(self.lock_file), exist_ok=True) self.fd = os.open(self.lock_file, os.O_CREAT | os.O_RDWR, stat.S_IRUSR | stat.S_IWUSR) # Get and set the close on exec and lock the file