From 6cd89063fd41f9367afc834ef87e4ac711fc37ba Mon Sep 17 00:00:00 2001 From: Florian Mounier Date: Wed, 18 Jul 2012 10:40:32 +0200 Subject: [PATCH] python 3 None comparison fix --- pygal/util.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pygal/util.py b/pygal/util.py index 2c6d200..bbffa2b 100644 --- a/pygal/util.py +++ b/pygal/util.py @@ -159,11 +159,11 @@ def compute_scale(min_, max_, logarithmic=False, order_min=None, return log_scale # else we fallback to normal scalling order = round(log10(max(abs(min_), abs(max_)))) - 1 - if order < order_min: + if order_min is not None and order < order_min: order = order_min else: while ((max_ - min_) / (10 ** order) < min_scale and - (order_min == None or order > order_min)): + (order_min is None or order > order_min)): order -= 1 step = float(10 ** order) while (max_ - min_) / step > max_scale: