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