From 5e359cad779af50e951c5f81e2701efc467687f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jason=20K=C3=B6lker?= Date: Wed, 24 Jul 2019 20:36:04 +0000 Subject: [PATCH] mlb: fix event stream subscription params Though a series of updated pr's the `plan-format=light` param was lost. Add it back in. Fixes: #642 --- marathon_lb.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/marathon_lb.py b/marathon_lb.py index 8672fb8e..b78fba83 100755 --- a/marathon_lb.py +++ b/marathon_lb.py @@ -244,10 +244,15 @@ def tasks(self): def get_event_stream(self, events): self.current_host = self.host - url = self.current_host + "/v2/events" + params = { + 'plan-format': 'light' + } if events: - url += "?" + urllib.parse.urlencode({'event_type': events}, - doseq=True) + params['event_type'] = events + + url_params = urllib.parse.urlencode(params, doseq=True) + url = '{}/v2/events?{}'.format(self.current_host, url_params) + return CurlHttpEventStream(url, self.__auth, self.__verify) def iter_events(self, stream):