From 20478a588c72621406547d1f1dbc24c231e02d5a Mon Sep 17 00:00:00 2001 From: Cameron Date: Tue, 18 Dec 2007 16:06:32 -0800 Subject: [PATCH] Fix the MirrorManager tests to be dist-agnostic too. --- apt_dht/MirrorManager.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apt_dht/MirrorManager.py b/apt_dht/MirrorManager.py index 6795cc0..67bb183 100644 --- a/apt_dht/MirrorManager.py +++ b/apt_dht/MirrorManager.py @@ -96,8 +96,8 @@ class TestMirrorManager(unittest.TestCase): "%s hashes don't match: %s != %s" % (path, found_hash[0], true_hash)) def test_findHash(self): - self.packagesFile = os.popen('ls -Sr /var/lib/apt/lists/ | grep -E "Packages$" | tail -n 1').read().rstrip('\n') - self.sourcesFile = os.popen('ls -Sr /var/lib/apt/lists/ | grep -E "Sources$" | tail -n 1').read().rstrip('\n') + self.packagesFile = os.popen('ls -Sr /var/lib/apt/lists/ | grep -E "_main_.*Packages$" | tail -n 1').read().rstrip('\n') + self.sourcesFile = os.popen('ls -Sr /var/lib/apt/lists/ | grep -E "_main_.*Sources$" | tail -n 1').read().rstrip('\n') for f in os.walk('/var/lib/apt/lists').next()[2]: if f[-7:] == "Release" and self.packagesFile.startswith(f[:-7]): self.releaseFile = f -- 2.39.5