Print a debug message, when the debug level is > 0. If extra arguments are present, they are substituted in the message using the standard string formatting operator.
(self, msg, *args)
| 242 | self.close() |
| 243 | |
| 244 | def msg(self, msg, *args): |
| 245 | """Print a debug message, when the debug level is > 0. |
| 246 | |
| 247 | If extra arguments are present, they are substituted in the |
| 248 | message using the standard string formatting operator. |
| 249 | |
| 250 | """ |
| 251 | if self.debuglevel > 0: |
| 252 | print('Telnet(%s,%s):' % (self.host, self.port), end=' ') |
| 253 | if args: |
| 254 | print(msg % args) |
| 255 | else: |
| 256 | print(msg) |
| 257 | |
| 258 | def set_debuglevel(self, debuglevel): |
| 259 | """Set the debug level. |
no test coverage detected