#NEWLINE# def _do_action( self , action , path , * args , **kwargs ) : #NEWLINE# #INDENT# 'Call **action** on each filesystem object in turn. If one raises an\n        :py:class:`IOError`, save the exception and try the rest. If none\n        succeed, re-raise the first exception.\n        ' #NEWLINE# first_exception = None #NEWLINE# for fs in self . filesystems : #NEWLINE# #INDENT# if fs . can_handle_path ( path ) : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# return getattr ( fs , action ) ( path , * args , ** args ) #NEWLINE# #UNINDENT# except IOError as e : #NEWLINE# #INDENT# if ( first_exception is None ) : #NEWLINE# #INDENT# first_exception = e #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# #UNINDENT# if ( first_exception is None ) : #NEWLINE# #INDENT# raise IOError ( ( "Can't handle path: %s" % path ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# raise first_exception