From 4c463808f7452ad67a08ac002c5b324c733d89d2 Mon Sep 17 00:00:00 2001 From: Ask Solem Date: Fri, 7 Jan 2011 13:31:40 +0100 Subject: [PATCH] Fixed serious error in fxrange introduced today --- kombu/utils/__init__.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/kombu/utils/__init__.py b/kombu/utils/__init__.py index e4fc7c29..b268d763 100644 --- a/kombu/utils/__init__.py +++ b/kombu/utils/__init__.py @@ -62,12 +62,11 @@ def fxrange(start=1.0, stop=None, step=1.0, repeatlast=False): while 1: if cur <= stop: yield cur - if cur + step <= stop: - cur += step + cur += step else: if not repeatlast: break - yield cur + yield cur - step def retry_over_time(fun, catch, args=[], kwargs={}, errback=None,