diff --git a/pkg/ruff.toml b/pkg/ruff.toml index 90be695d8c46..56f360b88314 100644 --- a/pkg/ruff.toml +++ b/pkg/ruff.toml @@ -2,8 +2,5 @@ extend = "../pyproject.toml" [lint] ignore = [ - "E501", # https://github.com/charliermarsh/ruff/issues/3206#issuecomment-1562681390 - - "EXE001", # Shebang is present but file is not executable "F821", # Undefined name ] diff --git a/pkg/storaged/crypto/luksmeta-monitor-hack.py b/pkg/storaged/crypto/luksmeta-monitor-hack.py index 770f64d984a6..a55c4e9ce407 100755 --- a/pkg/storaged/crypto/luksmeta-monitor-hack.py +++ b/pkg/storaged/crypto/luksmeta-monitor-hack.py @@ -96,7 +96,8 @@ def info(dev): match = re.match(b" ([0-9]+): clevis$", line) if match: try: - token = subprocess.check_output(["cryptsetup", "token", "export", dev, "--token-id", match.group(1)], + token = subprocess.check_output(["cryptsetup", "token", "export", + dev, "--token-id", match.group(1)], stderr=subprocess.PIPE) token_object = json.loads(token.decode()) if token_object.get("type") == "clevis": diff --git a/pkg/storaged/legacy-vdo/vdo-monitor.py b/pkg/storaged/legacy-vdo/vdo-monitor.py old mode 100644 new mode 100755 diff --git a/pkg/storaged/mount-users.py b/pkg/storaged/mount-users.py old mode 100644 new mode 100755 index 88460f635376..f4e337f2da28 --- a/pkg/storaged/mount-users.py +++ b/pkg/storaged/mount-users.py @@ -30,7 +30,8 @@ def get_stat(pid): # Field two is everything between the first "(" and the last ")", the rest is space separated. comm_start = stat.index("(") + 1 comm_end = stat.rindex(")") - return ([stat[0:comm_start - 1].strip(), stat[comm_start:comm_end], *list(filter(lambda f: f != '', stat[comm_end + 1:-1].split(' ')))]) + return ([stat[0:comm_start - 1].strip(), stat[comm_start:comm_end], + *list(filter(lambda f: f != '', stat[comm_end + 1:-1].split(' ')))]) def get_loginuser(pid): uid = os.stat("/proc/%s" % pid).st_uid