From: Michael Tremer Date: Fri, 21 Dec 2012 15:37:18 +0000 (+0100) Subject: builders: Fix comparisons with None. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=318a6dfd8c09b1ffb85651b319b198b2e23a4716;p=pbs.git builders: Fix comparisons with None. --- diff --git a/backend/builders.py b/backend/builders.py index fd3eace8..b27fea1a 100644 --- a/backend/builders.py +++ b/backend/builders.py @@ -130,6 +130,9 @@ class Builder(base.Object): self._disabled_arches = None def __cmp__(self, other): + if other is None: + return -1 + return cmp(self.id, other.id) @property