X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=apt_p2p%2FMirrorManager.py;h=f91db7647459d05ec40c8a4c066bfb943e382080;hb=c749275a35e84d45ea694f9dc90a89df09caf1b2;hp=5f511758dfda0026a722f2b7bd4b14120eb3d732;hpb=1e0537c366d9c95b4cda1b105fbcca52a9dbbb3a;p=quix0rs-apt-p2p.git diff --git a/apt_p2p/MirrorManager.py b/apt_p2p/MirrorManager.py index 5f51175..f91db76 100644 --- a/apt_p2p/MirrorManager.py +++ b/apt_p2p/MirrorManager.py @@ -109,11 +109,10 @@ class MirrorManager: @return: a deferred that will fire with the returned L{Hash.HashObject} """ site, baseDir, path = self.extractPath(url) + self.init(site, baseDir) if site in self.apt_caches and baseDir in self.apt_caches[site]: return self.apt_caches[site][baseDir].findHash(path) - d = defer.Deferred() - d.errback(MirrorError("Site Not Found")) - return d + return defer.fail(MirrorError("Site Not Found")) def cleanup(self): for site in self.apt_caches.keys():