From 66cc15a498a60fc3c2883f86faa4fe88dbcd9fc7 Mon Sep 17 00:00:00 2001 From: Marco Pesenti Gritti Date: Mon, 10 Sep 2007 09:30:48 +0000 Subject: Fix xo_color comparison. --- (limited to 'sugar/graphics') diff --git a/sugar/graphics/xocolor.py b/sugar/graphics/xocolor.py index 3f9fe31..d37eab1 100644 --- a/sugar/graphics/xocolor.py +++ b/sugar/graphics/xocolor.py @@ -225,9 +225,9 @@ class XoColor: def __cmp__(self, other): if isinstance(other, XoColor): - return self._stroke == other._stroke and self._fill == other._fill - else: - return -1 + if self._stroke == other._stroke and self._fill == other._fill: + return 0 + return -1 def get_stroke_color(self): return self._stroke -- cgit v0.9.1