summaryrefslogtreecommitdiff
path: root/tests/test_apt_cache.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_apt_cache.py')
-rw-r--r--tests/test_apt_cache.py3
1 files changed, 2 insertions, 1 deletions
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: