Пример #1
0
    def on_data(self, data_bytes):
        text = decode_and_clean(data_bytes)
        if not self.port:
            m = re.match('^Observatory listening on http://.*?:(\d+)', text)
            self.port = int(m.groups()[0])
            _logger.debug('captured observatory port: %d' % self.port)

        if self.listener:
            self.listener.on_data(text)
Пример #2
0
    def on_data(self, data_bytes):
        text = decode_and_clean(data_bytes)
        if not self.port:
            m = re.match('^Observatory listening on http://.*?:(\d+)', text)
            self.port = int(m.groups()[0])
            _logger.debug('captured observatory port: %d' % self.port)

        if self.listener:
            self.listener.on_data(text)
Пример #3
0
 def on_error(self, data_bytes):
     if self.listener:
         self.listener.on_error(decode_and_clean(data_bytes))
Пример #4
0
 def on_data(self, data_bytes):
     text = decode_and_clean(data_bytes)
     if self.listener:
         self.listener.on_data(text)
Пример #5
0
 def on_error(self, data_bytes):
     if self.listener:
         self.listener.on_error(decode_and_clean(data_bytes))
Пример #6
0
 def on_data(self, data_bytes):
     text = decode_and_clean(data_bytes)
     if self.listener:
         self.listener.on_data(text)