summaryrefslogtreecommitdiff
path: root/coverage/cmdline.py
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2015-10-03 16:59:46 -0400
committerNed Batchelder <ned@nedbatchelder.com>2015-10-03 16:59:46 -0400
commita877aaf13d9f72ee317b392c86313a3003bcb3b8 (patch)
tree22fdb568fd85c4179774fdfb4024486e37d3e1ce /coverage/cmdline.py
parentb27f9eab849696b46e9fbb84dcdc0f34078684d1 (diff)
downloadpython-coveragepy-git-a877aaf13d9f72ee317b392c86313a3003bcb3b8.tar.gz
Combine can now ignore errors.
Diffstat (limited to 'coverage/cmdline.py')
-rw-r--r--coverage/cmdline.py11
1 files changed, 9 insertions, 2 deletions
diff --git a/coverage/cmdline.py b/coverage/cmdline.py
index 2802948e..6f5719fd 100644
--- a/coverage/cmdline.py
+++ b/coverage/cmdline.py
@@ -58,6 +58,10 @@ class Opts(object):
'-i', '--ignore-errors', action='store_true',
help="Ignore errors while reading source files.",
)
+ ignore_combine_errors = optparse.make_option(
+ '-i', '--ignore-errors', action='store_true',
+ help="Ignore errors while reading data files.",
+ )
include = optparse.make_option(
'', '--include', action='store',
metavar="PAT1,PAT2,...",
@@ -265,7 +269,10 @@ CMDS = {
),
'combine': CmdOptionParser(
- "combine", GLOBAL_ARGS,
+ "combine",
+ [
+ Opts.ignore_combine_errors,
+ ] + GLOBAL_ARGS,
usage="<path1> <path2> ... <pathN>",
description=(
"Combine data from multiple coverage files collected "
@@ -464,7 +471,7 @@ class CoverageScript(object):
elif options.action == "combine":
self.coverage.load()
data_dirs = args or None
- self.coverage.combine(data_dirs)
+ self.coverage.combine(data_dirs, ignore_errors=options.ignore_errors)
self.coverage.save()
return OK