Fixes the deprecated use of calling errback with a string.
aptpkg_dir='.apt-dht'
+class MirrorError(Exception):
+ """Exception raised when there's a problem with the mirror."""
+
class MirrorManager:
"""Manages all requests for mirror objects."""
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("Not Found")
+ d.errback(MirrorError("Site Not Found"))
return d
class TestMirrorManager(unittest.TestCase):