Skip to content

Commit 0169cd6

Browse files
committed
Make sure we don't start coverage twice.
- Legacy-Id: 9192
1 parent b56580b commit 0169cd6

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

ietf/settings.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -289,11 +289,12 @@ def skip_unreadable_post(record):
289289
TEST_COVERAGE_MASTER_FILE = "release-coverage.json"
290290
TEST_COVERAGE_LATEST_FILE = "latest-coverage.json"
291291

292-
COVERAGE_CHECKER = None
292+
293293
if SERVER_MODE != 'production':
294294
import coverage
295295
COVERAGE_CHECKER = coverage.coverage(source=[ BASE_DIR ], cover_pylib=False, omit=TEST_CODE_COVERAGE_EXCLUDE)
296-
COVERAGE_CHECKER.start()
296+
if len(COVERAGE_CHECKER.collector._collectors) == 0:
297+
COVERAGE_CHECKER.start()
297298

298299
# WG Chair configuration
299300
MAX_WG_DELEGATES = 3

0 commit comments

Comments
 (0)