From af42eb913f06f8ae44c03b7534c3bf1773489a08 Mon Sep 17 00:00:00 2001 From: imbytecat Date: Thu, 9 Apr 2026 15:51:45 +0800 Subject: [PATCH] =?UTF-8?q?fix(fish):=20=E6=94=B9=E7=94=A8=20SourceError?= =?UTF-8?q?=20=E5=A4=84=E7=90=86=20shell=20=E6=9F=A5=E8=AF=A2=E5=A4=B1?= =?UTF-8?q?=E8=B4=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/fish.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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":