mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2025-01-18 18:56:28 +00:00
error if --coverage but no coverage package
This commit is contained in:
parent
20e191a8b9
commit
358f0c9ead
@ -202,14 +202,16 @@ def _setup_coverage(reactor):
|
||||
"""
|
||||
# can we put this _setup_coverage call after we hit
|
||||
# argument-parsing?
|
||||
if not '--coverage' in sys.argv:
|
||||
if '--coverage' not in sys.argv:
|
||||
return
|
||||
sys.argv.remove('--coverage')
|
||||
|
||||
try:
|
||||
import coverage
|
||||
except ImportError:
|
||||
return
|
||||
except RuntimeError(
|
||||
"The 'coveage' package must be installed to use --coverage"
|
||||
)
|
||||
|
||||
# this doesn't change the shell's notion of the environment, but
|
||||
# it makes the test in process_startup() succeed, which is the
|
||||
|
Loading…
Reference in New Issue
Block a user