summaryrefslogtreecommitdiff
path: root/coverage/control.py
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2018-10-21 15:57:40 -0400
committerNed Batchelder <ned@nedbatchelder.com>2018-10-21 15:57:40 -0400
commit8271bf4c4d5272043677f37a65e16d21621133cb (patch)
treee131de2cf99c4dcc5e5d932792fe8971458490ae /coverage/control.py
parent23963607312a888fc1c1949537497aa951b421c5 (diff)
downloadpython-coveragepy-git-8271bf4c4d5272043677f37a65e16d21621133cb.tar.gz
Make directories for the data file if needed. #721
Diffstat (limited to 'coverage/control.py')
-rw-r--r--coverage/control.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/coverage/control.py b/coverage/control.py
index a89a9da6..2eeec85c 100644
--- a/coverage/control.py
+++ b/coverage/control.py
@@ -408,6 +408,7 @@ class Coverage(object):
# Create the data file. We do this at construction time so that the
# data file will be written into the directory where the process
# started rather than wherever the process eventually chdir'd to.
+ ensure_dir_for_file(self.config.data_file)
self._data = CoverageData(
basename=self.config.data_file,
suffix=suffix,