diff options
author | Ned Batchelder <ned@nedbatchelder.com> | 2016-07-09 11:34:47 -0400 |
---|---|---|
committer | Ned Batchelder <ned@nedbatchelder.com> | 2016-07-09 11:34:47 -0400 |
commit | 616cca33b0fc9340a61a873970f47c8af37e5302 (patch) | |
tree | 069458fd5164f853b57e26a0239fbaf7165d44c4 /coverage/cmdline.py | |
parent | 037fbf13adcabb613b5af926afea475915845c72 (diff) | |
download | python-coveragepy-git-616cca33b0fc9340a61a873970f47c8af37e5302.tar.gz |
Get rid of args_ok, it shrank to almost nothing.
Diffstat (limited to 'coverage/cmdline.py')
-rw-r--r-- | coverage/cmdline.py | 20 |
1 files changed, 4 insertions, 16 deletions
diff --git a/coverage/cmdline.py b/coverage/cmdline.py index 7b76f590..e5306407 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 |