mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
Simplify code
This commit is contained in:
parent
36b0f58993
commit
13be9af65f
1 changed files with 1 additions and 6 deletions
|
@ -127,12 +127,7 @@ def list_shells():
|
||||||
with open("/etc/shells", "r") as f:
|
with open("/etc/shells", "r") as f:
|
||||||
content = f.readlines()
|
content = f.readlines()
|
||||||
|
|
||||||
shells = []
|
return [line.strip() for line in content if line.startswith("/")]
|
||||||
for line in content:
|
|
||||||
if line.startswith("/"):
|
|
||||||
shells.append(line.replace("\n",""))
|
|
||||||
return shells
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def shellexists(shell):
|
def shellexists(shell):
|
||||||
|
|
Loading…
Add table
Reference in a new issue