#NEWLINE# def explode( self , * filenames ) : #NEWLINE# #INDENT# if ( not filenames ) : #NEWLINE# #INDENT# return [ ] #NEWLINE# #UNINDENT# cmdline = [ self . _executable ] #NEWLINE# for filename in filenames : #NEWLINE# #INDENT# cmdline . append ( sh . basename ( filename ) ) #NEWLINE# #UNINDENT# ( stdout , _stderr ) = sh . execute ( _stderr ) #NEWLINE# results = [ ] #NEWLINE# missing = collections . deque ( filenames ) #NEWLINE# for line in stdout . splitlines ( ) : #NEWLINE# #INDENT# decoded = json . loads ( line ) #NEWLINE# decoded [ 'origin' ] = missing . popleft ( ) #NEWLINE# results . append ( decoded ) #NEWLINE# #UNINDENT# if missing : #NEWLINE# #INDENT# raise AssertionError ( ( '%s filenames names were lost during exploding: %s' % ( len ( missing ) , list ( missing ) ) ) ) #NEWLINE# #UNINDENT# if ( len ( results ) > len ( filenames ) ) : #NEWLINE# #INDENT# diff = ( len ( results ) - len ( filenames ) ) #NEWLINE# raise AssertionError ( ( '%s filenames appeared unexpectedly while exploding' % diff ) ) #NEWLINE# #UNINDENT# return results