def pageStart(self, partialContent):
        """Called on page download start.

        @param partialContent: tells us if the download is partial download we requested.
        """
        if partialContent and not self.requestedPartial:
            raise ValueError("we shouldn't get partial content response if we didn't want it!")
        if self.waiting:
            try:
                if not self.file:
                    self.file = self.openFile(partialContent)
            except IOError:
                #raise
                self.deferred.errback(Failure())
Called on page download start.

        @param partialContent: tells us if the download is partial download we requested.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/web/client.py