[chsh] les shells n'ont pas de \n à la fin
Ignore-this: 1fd0cd4f389b0a3a2b8b47d5cc9c9d9 darcs-hash:20120306201403-ffbb2-84be04aa8e6eb912c2f9c8c0f9ccd7b3f4099fd7.gz
This commit is contained in:
parent
9026502818
commit
58e0d96396
1 changed files with 1 additions and 1 deletions
|
@ -38,7 +38,7 @@ fd=open('/etc/shells')
|
|||
lines=fd.readlines()
|
||||
fd.close()
|
||||
|
||||
shells = [line for line in lines if not (line.startswith('#') or line.endswith('/rssh'))]
|
||||
shells = [line.strip() for line in lines if not (line.startswith('#') or line.endswith('/rssh'))]
|
||||
|
||||
if not shell in shells:
|
||||
print 'Shell invalide. Les shells valides sont :'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue