def write(self, data): if isinstance(data, unicode): data = data.encode("UTF-8") self.line += data if '\n' in data: ePythonOutput(self.line, self.lvlError) self.line = ''
def write(self, data): if isinstance(data, six.text_type): data = six.ensure_str(data.encode(encoding="UTF-8", errors="ignore")) self.line += data if "\n" in data: ePythonOutput(self.line, self.level) self.line = ""
def write(self, data): if isinstance(data, bytes): data = data.decode(decoding="UTF-8", errors="ignore") self.line += data if "\n" in data: ePythonOutput(self.line, self.level) self.line = ""
def write(self, data): if isinstance(data, unicode): data = data.encode(encoding="UTF-8", errors="ignore") self.line += data if "\n" in data: ePythonOutput(self.line, self.level) # OpenPLi, OpenViX # frame = sys._getframe(1) # OpenATV # ePythonOutput(frame.f_code.co_filename, frame.f_lineno, frame.f_code.co_name, self.line) # OpenATV self.line = ""
def write(self, data): if sys.version_info[0] >= 3: if isinstance(data, bytes): data = data.decode(encoding="UTF-8", errors="ignore") else: if isinstance(data, unicode): data = data.encode(encoding="UTF-8", errors="ignore") self.line += data if "\n" in data: ePythonOutput(self.line, self.level) self.line = ""
def write(self, data): if sys.version_info[0] >= 3: if isinstance(data, bytes): data = six.ensure_str(data, errors="ignore") else: if isinstance(data, unicode): data = six.ensure_str(data, errors="ignore") self.line += data if "\n" in data: ePythonOutput(self.line, self.level) self.line = ""
def write(self, data): if isinstance(data, unicode): data = data.encode("UTF-8") if '\n' in data: self.buf += data filename = sys._getframe(1).f_code.co_filename if '/usr/lib/enigma2/python/' in filename: filename = filename.replace('/usr/lib/enigma2/python/', '') elif '/git/' in filename: filename = filename.split('/git/')[1] ePythonOutput(filename, sys._getframe(1).f_lineno, sys._getframe(1).f_code.co_name, self.buf) self.buf = '' else: self.buf += data
def write(self, data): if isinstance(data, unicode): data = data.encode("UTF-8") if '\n' in data: self.buf += data filename = sys._getframe(1).f_code.co_filename if '/usr/lib/enigma2/python/' in filename: filename = filename.replace('/usr/lib/enigma2/python/', '') elif '/git/' in filename: filename = filename.split('/git/')[1] ePythonOutput(filename, sys._getframe(1).f_code.co_firstlineno, sys._getframe(1).f_code.co_name, self.buf) self.buf = '' else: self.buf += data
def write(self, data): if isinstance(data, unicode): data = data.encode('UTF-8') self.buf += data if '\n' in data: if not self.isTraceback and 'Traceback (most recent call last):\n' == self.buf: self.isTraceback = True if self.isTraceback == False: frame = sys._getframe(1) filename = frame.f_code.co_filename if 'BugHunting' in filename: ePythonOutput('', 0, '', self.buf) else: if '/usr/lib/enigma2/python/' in filename: filename = filename.replace('/usr/lib/enigma2/python/', '') elif '/git/' in filename: filename = filename.split('/git/')[1] ePythonOutput(filename, frame.f_lineno, frame.f_code.co_name, self.buf) else: ePythonOutput('', 0, '', self.buf) if self.isTraceback and self.buf[ 0] != ' ' and 'Traceback (most recent call last):\n' != self.buf: self.isTraceback = False self.buf = ''
def write(self, data): if isinstance(data, unicode): data = data.encode('UTF-8') self.buf += data if '\n' in data: if not self.isTraceback and 'Traceback (most recent call last):\n' == self.buf: self.isTraceback = True if self.isTraceback == False: frame = sys._getframe(1) filename = frame.f_code.co_filename if 'BugHunting' in filename: ePythonOutput('', 0, '', self.buf) else: if '/usr/lib/enigma2/python/' in filename: filename = filename.replace('/usr/lib/enigma2/python/', '') elif '/git/' in filename: filename = filename.split('/git/')[1] ePythonOutput(filename, frame.f_lineno, frame.f_code.co_name, self.buf) else: ePythonOutput('', 0, '', self.buf) if self.isTraceback and self.buf[0] != ' ' and 'Traceback (most recent call last):\n' != self.buf: self.isTraceback = False self.buf = ''
def write(self, data): if isinstance(data, unicode): data = data.encode('UTF-8') ePythonOutput(data)
def write(self, data): if isinstance(data, unicode): data = data.encode("UTF-8") ePythonOutput(data)