From 301b29d075c472510ae1ae36baac4c8cc079e1b0 Mon Sep 17 00:00:00 2001 From: Juan Jose Nicola Date: Thu, 14 May 2020 16:19:05 +0200 Subject: [PATCH] Use Path.open() for Supporting python 3.5 --- ospd_openvas/lock.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ospd_openvas/lock.py b/ospd_openvas/lock.py index 9aa23547c..a11a5fdb2 100644 --- a/ospd_openvas/lock.py +++ b/ospd_openvas/lock.py @@ -46,7 +46,7 @@ def acquire_lock(self) -> "LockFile": parent_dir = self._lock_file_path.parent parent_dir.mkdir(parents=True, exist_ok=True) - self._fd = open(self._lock_file_path, 'w') + self._fd = self._lock_file_path.open('w') except PermissionError as e: logger.error( "Failed to create lock file %s. %s",