From 616cca33b0fc9340a61a873970f47c8af37e5302 Mon Sep 17 00:00:00 2001 From: Ned Batchelder Date: Sat, 9 Jul 2016 11:34:47 -0400 Subject: Get rid of args_ok, it shrank to almost nothing. --- coverage/cmdline.py | 20 ++++---------------- 1 file changed, 4 insertions(+), 16 deletions(-) (limited to 'coverage/cmdline.py') 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 -- cgit v1.2.1