Rev | Line | |
---|
[106] | 1 | from urllib2 import BaseHandler
|
---|
| 2 | from _util import deprecation
|
---|
| 3 | from _response import response_seek_wrapper
|
---|
| 4 |
|
---|
| 5 |
|
---|
| 6 | class SeekableProcessor(BaseHandler):
|
---|
| 7 | """Deprecated: Make responses seekable."""
|
---|
| 8 |
|
---|
| 9 | def __init__(self):
|
---|
| 10 | deprecation(
|
---|
| 11 | "See http://wwwsearch.sourceforge.net/mechanize/doc.html#seekable")
|
---|
| 12 |
|
---|
| 13 | def any_response(self, request, response):
|
---|
| 14 | if not hasattr(response, "seek"):
|
---|
| 15 | return response_seek_wrapper(response)
|
---|
| 16 | return response
|
---|
Note:
See
TracBrowser
for help on using the repository browser.