fix for flake8
This commit is contained in:
@@ -165,7 +165,7 @@ class ApplicationPartPut(ApplicationBase):
|
|||||||
bool(rights.intersect(access.permissions, "Ww")),
|
bool(rights.intersect(access.permissions, "Ww")),
|
||||||
bool(rights.intersect(access.parent_permissions, "w")))
|
bool(rights.intersect(access.parent_permissions, "w")))
|
||||||
|
|
||||||
with self._storage.acquire_lock("w", user):
|
with self._storage.acquire_lock("w", user, path=path):
|
||||||
item = next(iter(self._storage.discover(path)), None)
|
item = next(iter(self._storage.discover(path)), None)
|
||||||
parent_item = next(iter(
|
parent_item = next(iter(
|
||||||
self._storage.discover(access.parent_path)), None)
|
self._storage.discover(access.parent_path)), None)
|
||||||
|
|||||||
@@ -59,7 +59,7 @@ class StoragePartLock(StorageBase):
|
|||||||
self._hook = configuration.get("storage", "hook")
|
self._hook = configuration.get("storage", "hook")
|
||||||
|
|
||||||
@types.contextmanager
|
@types.contextmanager
|
||||||
def acquire_lock(self, mode: str, user: str = "") -> Iterator[None]:
|
def acquire_lock(self, mode: str, user: str = "", *args, **kwargs) -> Iterator[None]:
|
||||||
with self._lock.acquire(mode):
|
with self._lock.acquire(mode):
|
||||||
yield
|
yield
|
||||||
# execute hook
|
# execute hook
|
||||||
|
|||||||
Reference in New Issue
Block a user