Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pkg: cleanup ruff.toml exceptions #20805

Merged
merged 2 commits into from
Jul 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions pkg/ruff.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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
]
3 changes: 2 additions & 1 deletion pkg/storaged/crypto/luksmeta-monitor-hack.py
Original file line number Diff line number Diff line change
Expand Up @@ -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":
Expand Down
Empty file modified pkg/storaged/legacy-vdo/vdo-monitor.py
100644 → 100755
Empty file.
3 changes: 2 additions & 1 deletion pkg/storaged/mount-users.py
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down