diff --git a/modules/fish.py b/modules/fish.py index a7af41a..7a05978 100644 --- a/modules/fish.py +++ b/modules/fish.py @@ -37,8 +37,7 @@ class FishModule(Module): check=False, ) if result.returncode != 0: - decman.error(f"无法读取用户 {self.user} 的 passwd 信息") - return + raise decman.SourceError(f"无法读取用户 {self.user} 的 passwd 信息") # passwd 格式: name:x:uid:gid:gecos:home:shell shell = result.stdout.strip().split(":")[-1] if shell != "/usr/bin/fish":