예제 #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)