summaryrefslogtreecommitdiff
path: root/linaro-cp.py
diff options
context:
space:
mode:
Diffstat (limited to 'linaro-cp.py')
-rwxr-xr-xlinaro-cp.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/linaro-cp.py b/linaro-cp.py
index 459e2c0..14dd6d8 100755
--- a/linaro-cp.py
+++ b/linaro-cp.py
@@ -234,9 +234,10 @@ def main():
key = arguments.key
else:
key = os.environ.get('PUBLISH_TOKEN')
- if key and arguments.api_version == '1':
- # Default to api v2 if not specified
- arguments.api_version = '2'
+ if key:
+ if arguments.api_version == '1':
+ # Default to api v2 if not specified
+ arguments.api_version = '2'
else:
key = os.environ.get('PUBLISH_KEY')
if key is None: