From 25d39a7b78860102f7971033227ec157789a40b3 Mon Sep 17 00:00:00 2001 From: Devon Blandin Date: Tue, 19 Apr 2016 16:05:17 -0400 Subject: [PATCH] Update ApiClient host env var to CODECLIMATE_API_HOST This commit also strips trailing slashes from the host. --- reporter/components/api_client.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/reporter/components/api_client.py b/reporter/components/api_client.py index 58208ec..a2e574b 100644 --- a/reporter/components/api_client.py +++ b/reporter/components/api_client.py @@ -5,7 +5,7 @@ class ApiClient: def __init__(self, host=None, timeout=5): - self.host = host or self.__default_host() + self.host = host or self.__default_host().rstrip("/") self.timeout = timeout def post(self, payload): @@ -22,4 +22,4 @@ def post(self, payload): return response def __default_host(self): - return os.environ.get("CODECLIMATE_HOST", "https://codeclimate.com") + return os.environ.get("CODECLIMATE_API_HOST", "https://codeclimate.com")