diff options
author | Rebecca Grayson <becky.grayson1@hotmail.co.uk> | 2019-07-12 11:39:29 +0100 |
---|---|---|
committer | Rebecca Grayson <becky.grayson1@hotmail.co.uk> | 2019-07-16 15:35:42 +0000 |
commit | cf3a1f6248fa6c2784020ab8d91b42fe5ed29779 (patch) | |
tree | 4e2420c1ebac2675acb7b85b8c298e6136030355 | |
parent | fbb8eea8334023e30c8719cb52f9b0e226b4eb8b (diff) | |
download | buildstream-cf3a1f6248fa6c2784020ab8d91b42fe5ed29779.tar.gz |
cli.py: change is/is not None checks
-rw-r--r-- | src/buildstream/_frontend/cli.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/buildstream/_frontend/cli.py b/src/buildstream/_frontend/cli.py index d4686e4fc..3af4121ea 100644 --- a/src/buildstream/_frontend/cli.py +++ b/src/buildstream/_frontend/cli.py @@ -987,11 +987,15 @@ def artifact_checkout(app, force, deps, integrate, hardlinks, tar, pull_, direct """ from ..element import Scope - if hardlinks and tar is not None: + if hardlinks and tar: click.echo("ERROR: options --hardlinks and --tar conflict", err=True) sys.exit(-1) - if tar is not None and directory is not None: + if not tar and not directory: + click.echo("ERROR: One of --directory or --tar must be provided", err=True) + sys.exit(-1) + + if tar and directory: click.echo("ERROR: options --directory and --tar conflict", err=True) sys.exit(-1) |