mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2025-01-31 08:25:35 +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
|
# can we put this _setup_coverage call after we hit
|
||||||
# argument-parsing?
|
# argument-parsing?
|
||||||
if not '--coverage' in sys.argv:
|
if '--coverage' not in sys.argv:
|
||||||
return
|
return
|
||||||
sys.argv.remove('--coverage')
|
sys.argv.remove('--coverage')
|
||||||
|
|
||||||
try:
|
try:
|
||||||
import coverage
|
import coverage
|
||||||
except ImportError:
|
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
|
# this doesn't change the shell's notion of the environment, but
|
||||||
# it makes the test in process_startup() succeed, which is the
|
# it makes the test in process_startup() succeed, which is the
|
||||||
|
Loading…
x
Reference in New Issue
Block a user