def _filter(self, line): line = self._RESOURCE.sub( "%s%s(%s):" % (clidisplay.help_header(r'\1'), r'\2', r'\3'), line) line = self._NODES.sub(clidisplay.help_header(r'\1'), line) line = self._RESOURCES.sub(clidisplay.help_header(r'\1'), line) line = self._GROUP.sub(r'\1: ' + clidisplay.help_header(r'\2'), line) line = self._WARNS.sub(clidisplay.warn(r'\1'), line) line = self._OK.sub(clidisplay.ok(r'\1'), line) line = self._ERROR.sub(clidisplay.error(r'\1'), line) return line
def _filter(self, line): line = self._RESOURCE.sub("%s%s(%s):" % (clidisplay.help_header(r'\1'), r'\2', r'\3'), line) line = self._NODES.sub(clidisplay.help_header(r'\1'), line) line = self._RESOURCES.sub(clidisplay.help_header(r'\1'), line) line = self._GROUP.sub(r'\1: ' + clidisplay.help_header(r'\2'), line) line = self._WARNS.sub(clidisplay.warn(r'\1'), line) line = self._OK.sub(clidisplay.ok(r'\1'), line) line = self._ERROR.sub(clidisplay.error(r'\1'), line) return line
def error(self, s): self._prefix(clidisplay.error("ERROR"), s)