(self, msg, info="")
| 147 | |
| 148 | # show error message |
| 149 | def errmsg(self, msg, info=""): |
| 150 | info = str(info).strip() |
| 151 | if info: # monkeypatch to make python error message less ugly |
| 152 | info = item(re.findall('Errno -?\d+\] (.*)', info), |
| 153 | '') or info.splitlines()[-1] |
| 154 | info = Style.RESET_ALL + Style.DIM + \ |
| 155 | " (" + info.strip('<>') + ")" + Style.RESET_ALL |
| 156 | if msg: |
| 157 | print(Back.RED + msg + info) |
| 158 | |
| 159 | # show printer and status |
| 160 | def discover(self, xxx_todo_changeme): |
no test coverage detected