From 63afb8417d822c7d5722969e67985e1d7759503f Mon Sep 17 00:00:00 2001 From: Daniel Moody Date: Mon, 14 Jan 2019 12:05:58 -0600 Subject: [PATCH 1/2] update to support Appveyor Ubuntu image, which has lower case 'true's in the environment variable strings --- codecov/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/codecov/__init__.py b/codecov/__init__.py index 82e12136..c476da66 100644 --- a/codecov/__init__.py +++ b/codecov/__init__.py @@ -405,7 +405,7 @@ def main(*argv, **kwargs): # -------- # AppVeyor # -------- - elif os.getenv('CI') == "True" and os.getenv('APPVEYOR') == 'True': + elif os.getenv('CI').lower() == "true" and os.getenv('APPVEYOR').lower() == 'true': # http://www.appveyor.com/docs/environment-variables query.update(dict(branch=os.getenv('APPVEYOR_REPO_BRANCH'), service="appveyor", From e19da89a0db82e179ae658a20d15aeda08dd342a Mon Sep 17 00:00:00 2001 From: Daniel Moody Date: Mon, 14 Jan 2019 13:50:12 -0600 Subject: [PATCH 2/2] handle the case the env variable is not present and make sure we don't call lower on NoneType --- codecov/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/codecov/__init__.py b/codecov/__init__.py index c476da66..1ec0261c 100644 --- a/codecov/__init__.py +++ b/codecov/__init__.py @@ -405,7 +405,7 @@ def main(*argv, **kwargs): # -------- # AppVeyor # -------- - elif os.getenv('CI').lower() == "true" and os.getenv('APPVEYOR').lower() == 'true': + elif os.getenv('CI', 'false').lower() == 'true' and os.getenv('APPVEYOR', 'false').lower() == 'true': # http://www.appveyor.com/docs/environment-variables query.update(dict(branch=os.getenv('APPVEYOR_REPO_BRANCH'), service="appveyor",