def callback(self, filename, lines, **kwargs):
timestamp = self.get_timestamp(**kwargs)<EOL>if kwargs.get('<STR_LIT>', False):<EOL><INDENT>del kwargs['<STR_LIT>']<EOL><DEDENT>for line in lines:<EOL><INDENT>try:<EOL><INDENT>import warnings<EOL>with warnings.catch_warnings():<EOL><INDENT>warnings.simplefilter('<STR_LIT:error>')<EOL>self._client.publish(self._topic, self.format(filename, line, timestamp, **kwargs), <NUM_LIT:0>)<EOL><DEDENT><DEDENT>except Exception as e:<EOL><INDENT>try:<EOL><INDENT>raise TransportException(e.strerror)<EOL><DEDENT>except AttributeError:<EOL><INDENT>raise TransportException('<STR_LIT>')<EOL><DEDENT><DEDENT><DEDENT>
publishes lines one by one to the given topic