Package: apt-proxy
Version: 1.9.36.1

When backend servers time out, I get the following exception in the
log:


2007/11/08 15:30 CET [Channel,1,172.30.3.1] Traceback (most recent call last):
          File "/usr/lib/python2.4/site-packages/twisted/python/log.py", line 
53, in callWithLogger
            return callWithContext({"system": lp}, func, *args, **kw)
          File "/usr/lib/python2.4/site-packages/twisted/python/log.py", line 
38, in callWithContext
            return context.call({ILogContext: newCtx}, func, *args, **kw)
          File "/usr/lib/python2.4/site-packages/twisted/python/context.py", 
line 59, in callWithContext
            return self.currentContext().callWithContext(ctx, func, *args, **kw)
          File "/usr/lib/python2.4/site-packages/twisted/python/context.py", 
line 37, in callWithContext
            return func(*args,**kw)
        --- <exception caught here> ---
          File 
"/usr/lib/python2.4/site-packages/twisted/internet/selectreactor.py", line 139, 
in _doReadOrWrite
            why = getattr(selectable, method)()
          File "/usr/lib/python2.4/site-packages/twisted/internet/tcp.py", line 
348, in doRead
            return self.protocol.dataReceived(data)
          File "/usr/lib/python2.4/site-packages/twisted/protocols/basic.py", 
line 232, in dataReceived
            why = self.lineReceived(line)
          File "/usr/lib/python2.4/site-packages/twisted/web/http.py", line 
1004, in lineReceived
            self.allContentReceived()
          File "/usr/lib/python2.4/site-packages/apt_proxy/apt_proxy.py", line 
237, in allContentReceived
            http.HTTPChannel.allContentReceived(self)
          File "/usr/lib/python2.4/site-packages/twisted/web/http.py", line 
1045, in allContentReceived
            req.requestReceived(command, path, version)
          File "/usr/lib/python2.4/site-packages/twisted/web/http.py", line 
601, in requestReceived
            self.process()
          File "/usr/lib/python2.4/site-packages/apt_proxy/clients.py", line 
119, in process
            self.cacheEntry.add_request(self)
          File "/usr/lib/python2.4/site-packages/apt_proxy/cache.py", line 135, 
in add_request
            self.get()
          File "/usr/lib/python2.4/site-packages/apt_proxy/cache.py", line 189, 
in get
            self.start_download()
          File "/usr/lib/python2.4/site-packages/apt_proxy/cache.py", line 344, 
in start_download
            self.backend.start_download(self)
          File "/usr/lib/python2.4/site-packages/apt_proxy/apt_proxy.py", line 
143, in start_download
            self.queue.addFile(entry)
          File "/usr/lib/python2.4/site-packages/apt_proxy/fetchers.py", line 
998, in addFile
            q.addFile(cacheEntry)
          File "/usr/lib/python2.4/site-packages/apt_proxy/fetchers.py", line 
910, in addFile
            self.startNextDownload()
          File "/usr/lib/python2.4/site-packages/apt_proxy/fetchers.py", line 
937, in startNextDownload
            if self.fetcher.backendServer.backend != self.activeFile.backend:
        exceptions.AttributeError: 'NoneType' object has no attribute 'backend'


It looks like adding "self.fetcher.backendServer is None or" before
that condition solves the problem (you have to add another check
before the log.debug command since it also evaluates
self.fetcher.backendServer.backend).




-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to