From 86abaa725a3d4681db83e0dc7bd1a858aa00e934 Mon Sep 17 00:00:00 2001 From: Philip Guyton Date: Wed, 20 Mar 2024 18:46:37 +0000 Subject: [PATCH] add type hint to acl.py to enforce str() members of run_command() args #2807 --- src/rockstor/system/acl.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/rockstor/system/acl.py b/src/rockstor/system/acl.py index 9b571279c..11caa5eb4 100644 --- a/src/rockstor/system/acl.py +++ b/src/rockstor/system/acl.py @@ -22,8 +22,8 @@ CHMOD = "/usr/bin/chmod" -def chown(share, owner, group=None, recursive=False): - cmd = [ +def chown(share: str, owner: str, group: str | None = None, recursive: bool = False): + cmd: list[str] = [ CHOWN, ] if recursive is True: @@ -34,8 +34,8 @@ def chown(share, owner, group=None, recursive=False): return run_command(cmd) -def chmod(share, perm_bits, recursive=False): - cmd = [ +def chmod(share: str, perm_bits: str, recursive: bool = False): + cmd: list[str] = [ CHMOD, ] if recursive is True: