From 04df083f6e064cbd9d8f2319c3652459c27a3da8 Mon Sep 17 00:00:00 2001 From: David Caplan Date: Mon, 13 Mar 2017 20:28:10 -0400 Subject: [PATCH] fix an issue where the CLI was ignoring env var or other default api_key --- solvebio/cli/main.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/solvebio/cli/main.py b/solvebio/cli/main.py index 5e80ebac..0755f9ca 100644 --- a/solvebio/cli/main.py +++ b/solvebio/cli/main.py @@ -209,7 +209,10 @@ def main(argv=sys.argv[1:]): if args.api_key: solvebio.api_key = args.api_key - else: + + if not solvebio.api_key: + # If nothing is set (via command line or environment) + # look in local credentials try: from .credentials import get_credentials _, solvebio.api_key = get_credentials()