diff --git a/scripts/dev/check_coverage.py b/scripts/dev/check_coverage.py index 89208b037..1c56a2d60 100644 --- a/scripts/dev/check_coverage.py +++ b/scripts/dev/check_coverage.py @@ -175,7 +175,7 @@ def check(fileobj, perfect_files): basedir = os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..')) if os.path.isabs(filename): - common_path = os.path.commonpath([basedir, filename]) + common_path = os.path.commonprefix([basedir, filename]) if common_path: filename = filename[len(common_path):].lstrip('/')