From 3b7f282bbd2264e9dcc362011aec4592459a664e Mon Sep 17 00:00:00 2001 From: Daniel Grana Date: Mon, 1 Dec 2008 18:44:04 +0000 Subject: [PATCH] fix missing import errors --HG-- extra : convert_revision : svn%3Ab85faa78-f9eb-468e-a121-7cced6da292c%40454 --- scrapy/trunk/scrapy/patches/monkeypatches.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/scrapy/trunk/scrapy/patches/monkeypatches.py b/scrapy/trunk/scrapy/patches/monkeypatches.py index ce600d774..d18c12864 100644 --- a/scrapy/trunk/scrapy/patches/monkeypatches.py +++ b/scrapy/trunk/scrapy/patches/monkeypatches.py @@ -3,8 +3,8 @@ Monkey patches These are generally a bad idea. """ -from twisted.web.client import HTTPClientFactory, HTTPPageGetter import twisted +from twisted.web.client import HTTPClientFactory # Extend limit for BeautifulSoup parsing loops @@ -49,6 +49,10 @@ def patch_HTTPClientFactory_gotHeaders(): setattr(HTTPClientFactory, 'gotHeaders', _new_gotHeaders) def patch_HTTPPageGetter_handleResponse(): + from twisted.web.client import PartialDownloadError, HTTPPageGetter + from twisted.python import failure + from twisted.web import error + def _handleResponse(self, response): if self.quietLoss: return