From 19038342c9cc14573ad77848203b7a7f73def7a3 Mon Sep 17 00:00:00 2001 From: Cameron Lowe Date: Mon, 23 May 2016 15:31:51 -0500 Subject: [PATCH] while path: --- bulbs/utils/tunic.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/bulbs/utils/tunic.py b/bulbs/utils/tunic.py index 744d5016..774dafe0 100644 --- a/bulbs/utils/tunic.py +++ b/bulbs/utils/tunic.py @@ -40,14 +40,12 @@ def get_campaigns(self, filter_active=False): path = "/campaign/" if filter_active: path += "?active=True" - while True: + while path: resp = self.get(path).json() campaigns.update({ c["id"]: c for c in resp.get("results", {}) }) path = resp.get("next") - if not path: - break return campaigns def get_active_campaigns(self):