diff --git a/attributs.py b/attributs.py index 746e5e9..6918b81 100644 --- a/attributs.py +++ b/attributs.py @@ -453,8 +453,8 @@ class loginShell(Attr): def parse_value(self, shell, ldif): with open('/etc/shells') as f: - shells = f.readlines() - if (shell not in shells) or shell.startswith('#'): + shells = [ l.strip() for l in f.readlines() if not l.startswith('#') ] + if (shell not in shells) raise ValueError("Shell %s invalide" % shell) self.value = shell