#NEWLINE# def command_unmount_all( self ) : #NEWLINE# #INDENT# 'Unmounts all sftp file systems known to sftpman.\n        Usage: sftpman unmount_all\n        ' #NEWLINE# has_failed = False #NEWLINE# for system_id in self . environment . get_mounted_ids ( ) : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# system = SystemModel . create_by_id ( system_id , self . environment ) #NEWLINE# controller = SystemControllerModel ( system , self . environment ) #NEWLINE# controller . unmount ( ) #NEWLINE# #UNINDENT# except SftpConfigException as e : #NEWLINE# #INDENT# sys . stderr . write ( ( 'Cannot unmount %s: %s\n\n' % ( system_id , str ( e ) ) ) ) #NEWLINE# has_failed = True #NEWLINE# #UNINDENT# #UNINDENT# sys . exit ( ( 0 if ( not has_failed ) else 1 ) )