(iterator)
| 553 | |
| 554 | |
| 555 | def check_iterator(iterator): |
| 556 | valid_type = bytes |
| 557 | # Technically a bytes (str for py2.x) is legal, which is why it's a |
| 558 | # really bad idea, because it may cause the response to be returned |
| 559 | # character-by-character |
| 560 | |
| 561 | if isinstance(iterator, valid_type): |
| 562 | raise AssertionError( |
| 563 | "You should not return a bytes as your application iterator, " |
| 564 | "instead return a single-item list containing that string." |
| 565 | ) |
| 566 | |
| 567 | __all__ = ['middleware'] |
no outgoing calls
no test coverage detected
searching dependent graphs…