summaryrefslogtreecommitdiff
path: root/coverage/data.py
diff options
context:
space:
mode:
Diffstat (limited to 'coverage/data.py')
-rw-r--r--coverage/data.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/coverage/data.py b/coverage/data.py
index f605e164..bcbfa427 100644
--- a/coverage/data.py
+++ b/coverage/data.py
@@ -132,7 +132,13 @@ def combine_parallel_data(
data.update(new_data, aliases=aliases)
files_combined += 1
if message:
- message(f"Combined data file {os.path.relpath(f)}")
+ try:
+ message(f"Combined data file {os.path.relpath(f)}")
+ except ValueError:
+ # ValueError can be raised under Windows when os.getcwd() returns a
+ # folder from a different drive than the drive of f, in which case
+ # we print the original value of f instead of its relative path
+ message(f"Combined data file {f!r}")
if not keep:
if data._debug.should('dataio'):
data._debug.write(f"Deleting combined data file {f!r}")