def _collapseMsg(self, msg):
        """
        Take msg, which is a dictionary of lists of output chunks, and
        concatenate all the chunks into a single string
        """
        retval = {}
        for logname in msg:
            data = u""
            for m in msg[logname]:
                m = bytes2unicode(m, self.builder.unicode_encoding)
                data += m
            if isinstance(logname, tuple) and logname[0] == 'log':
                retval['log'] = (logname[1], data)
            else:
                retval[logname] = data
        return retval
def _collapseMsg ( self , msg ) : retval = { } for logname in msg : data = u"" for m in msg [ logname ] : m = bytes2unicode ( m , self . builder . unicode_encoding ) data += m if isinstance ( logname , tuple ) and logname [ 0 ] == 'log' : retval [ 'log' ] = ( logname [ 1 ] , data ) else : retval [ logname ] = data return retval
Take msg, which is a dictionary of lists of output chunks, and
        concatenate all the chunks into a single string