summaryrefslogtreecommitdiff
path: root/coverage
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2016-07-09 11:34:47 -0400
committerNed Batchelder <ned@nedbatchelder.com>2016-07-09 11:34:47 -0400
commita87bfb11160fc30eebaa08375ff263a503c8887d (patch)
tree9eca9d9cf00b74f8b5025d3354aad021a444c941 /coverage
parentc6fcead833e7e94cb45ba3651ea0850b09ba1212 (diff)
downloadpython-coveragepy-a87bfb11160fc30eebaa08375ff263a503c8887d.tar.gz
Get rid of args_ok, it shrank to almost nothing.
Diffstat (limited to 'coverage')
-rw-r--r--coverage/cmdline.py20
1 files changed, 4 insertions, 16 deletions
diff --git a/coverage/cmdline.py b/coverage/cmdline.py
index 7b76f59..e530640 100644
--- a/coverage/cmdline.py
+++ b/coverage/cmdline.py
@@ -447,10 +447,6 @@ class CoverageScript(object):
if self.do_help(options, args, parser):
return OK
- # Check for conflicts and problems in the options.
- if not self.args_ok(options, args):
- return ERR
-
# We need to be able to import from the current directory, because
# plugins may try to, for example, to read Django settings.
sys.path[0] = ''
@@ -595,21 +591,13 @@ class CoverageScript(object):
return False
- def args_ok(self, options, args):
- """Check for conflicts and problems in the options.
-
- Returns True if everything is OK, or False if not.
-
- """
- if options.action == "run" and not args:
- self.help_fn("Nothing to do.")
- return False
-
- return True
-
def do_run(self, options, args):
"""Implementation of 'coverage run'."""
+ if not args:
+ self.help_fn("Nothing to do.")
+ return ERR
+
if options.append and self.coverage.get_option("run:parallel"):
self.help_fn("Can't append to data files in parallel mode.")
return ERR