[chsh] les shells n'ont pas de \n à la fin

Ignore-this: 1fd0cd4f389b0a3a2b8b47d5cc9c9d9

darcs-hash:20120306201403-ffbb2-84be04aa8e6eb912c2f9c8c0f9ccd7b3f4099fd7.gz
This commit is contained in:
Nicolas Dandrimont 2012-03-06 21:14:03 +01:00
parent 9026502818
commit 58e0d96396

View file

@ -38,7 +38,7 @@ fd=open('/etc/shells')
lines=fd.readlines() lines=fd.readlines()
fd.close() 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: if not shell in shells:
print 'Shell invalide. Les shells valides sont :' print 'Shell invalide. Les shells valides sont :'