watchdog: Union[Literal["auto"], bool] = "auto"
tags: Optional[List[IDPattern]] = None
log: Optional[List[Literal["ip", "name"]]] = None
- #dry_run: bool = False
+ # dry_run: bool = False
_LAYER = Raw
watchdog: bool
tags: Optional[List[IDPattern]]
log: Optional[List[Literal["ip", "name"]]]
- #dry_run: bool
+ # dry_run: bool
def _watchdog(self, obj: Raw) -> Any:
if obj.watchdog == "auto":
WRITE = auto()
EXECUTE = auto()
+
def _check_permission(dest_path: Path, perm_mode: _PermissionMode) -> bool:
chflags = {
_PermissionMode.READ: [stat.S_IRUSR, stat.S_IRGRP, stat.S_IROTH],
logger.info(f"{msg}, but the resolver can somehow (ACLs, ...) write to the directory")
# check that existing file is writable
- if self._value.exists() and not _check_permission(
- self._value, _PermissionMode.WRITE
- ):
+ if self._value.exists() and not _check_permission(self._value, _PermissionMode.WRITE):
msg = f"{USER}:{GROUP} has insufficient permissions to write/execute '{self._value}'"
if not os.access(self._value, os.W_OK):
raise ValueError(msg)