Return most recent 'RECENT' responses if any exist, else prompt server for an update using the 'NOOP' command. (typ, [data]) = .recent() 'data' is None if no new messages, else list of RECENT responses, most recent last.
(self)
| 447 | |
| 448 | |
| 449 | def recent(self): |
| 450 | """Return most recent 'RECENT' responses if any exist, |
| 451 | else prompt server for an update using the 'NOOP' command. |
| 452 | |
| 453 | (typ, [data]) = <instance>.recent() |
| 454 | |
| 455 | 'data' is None if no new messages, |
| 456 | else list of RECENT responses, most recent last. |
| 457 | """ |
| 458 | name = 'RECENT' |
| 459 | typ, dat = self._untagged_response('OK', [None], name) |
| 460 | if dat[-1]: |
| 461 | return typ, dat |
| 462 | typ, dat = self.noop() # Prod server for response |
| 463 | return self._untagged_response(typ, dat, name) |
| 464 | |
| 465 | |
| 466 | def response(self, code): |
nothing calls this directly
no test coverage detected