pmb.chroot: Rename exists() to user_exists() (MR 2545)

This name is what's used at the one call site the codebase currently
has, and it means we can have an explicit re-export which Ruff won't
complain about.
This commit is contained in:
Stefan Hansson 2025-02-04 16:35:37 +01:00 committed by Oliver Smith
parent bdcc188f05
commit ebc5ab9ecd
No known key found for this signature in database
GPG key ID: 5AE7F5513E0885CB
2 changed files with 2 additions and 2 deletions

View file

@ -11,7 +11,7 @@ from pmb.chroot.run import (
rootm as rootm,
user as user,
userm as userm,
exists as user_exists,
user_exists as user_exists,
)
from pmb.chroot.shutdown import shutdown as shutdown
from pmb.chroot.zap import zap as zap, del_chroot as del_chroot

View file

@ -249,7 +249,7 @@ def user(
return userm([cmd], chroot, working_dir, output, output_return, check, env)
def exists(username: str, chroot: Chroot = Chroot.native()) -> bool:
def user_exists(username: str, chroot: Chroot = Chroot.native()) -> bool:
"""
Checks if username exists in the system