Read everything up to one of the chars in endchars. This is outside the formal grammar. The InvalidMailbox TokenList that is returned acts like a Mailbox, but the data attributes are None.
(value, endchars)
| 1852 | return mailbox, value |
| 1853 | |
| 1854 | def get_invalid_mailbox(value, endchars): |
| 1855 | """ Read everything up to one of the chars in endchars. |
| 1856 | |
| 1857 | This is outside the formal grammar. The InvalidMailbox TokenList that is |
| 1858 | returned acts like a Mailbox, but the data attributes are None. |
| 1859 | |
| 1860 | """ |
| 1861 | invalid_mailbox = InvalidMailbox() |
| 1862 | while value and value[0] not in endchars: |
| 1863 | if value[0] in PHRASE_ENDS: |
| 1864 | invalid_mailbox.append(ValueTerminal(value[0], |
| 1865 | 'misplaced-special')) |
| 1866 | value = value[1:] |
| 1867 | else: |
| 1868 | token, value = get_phrase(value) |
| 1869 | invalid_mailbox.append(token) |
| 1870 | return invalid_mailbox, value |
| 1871 | |
| 1872 | def get_mailbox_list(value): |
| 1873 | """ mailbox-list = (mailbox *("," mailbox)) / obs-mbox-list |
no test coverage detected
searching dependent graphs…