From fc2a74a4863095c3ac87b1569675054b63a63412 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Tue, 7 Sep 2010 13:49:25 +0200 Subject: tests/test_apt_cache.py: fix test --- tests/test_apt_cache.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'tests/test_apt_cache.py') diff --git a/tests/test_apt_cache.py b/tests/test_apt_cache.py index 428060f3..2f74a0bd 100644 --- a/tests/test_apt_cache.py +++ b/tests/test_apt_cache.py @@ -87,7 +87,8 @@ class TestAptCache(unittest.TestCase): def test_apt_update(self): rootdir = "./data/tmp" - shutil.rmtree(rootdir) + if os.path.exists(rootdir): + shutil.rmtree(rootdir) try: os.makedirs(os.path.join(rootdir, "var/lib/apt/lists/partial")) except OSError, e: -- cgit v1.2.3