From 801b3b7293517adefb8b13c7c3aa9f7032b474fe Mon Sep 17 00:00:00 2001 From: Selwin Ong Date: Thu, 3 Aug 2017 13:49:58 +0700 Subject: [PATCH] Added non zero check for Queue class. --- rq/queue.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/rq/queue.py b/rq/queue.py index e4b6a47..9d2357f 100644 --- a/rq/queue.py +++ b/rq/queue.py @@ -75,6 +75,12 @@ class Queue(object): def __len__(self): return self.count + def __nonzero__(self): + return True + + def __bool__(self): + return True + def __iter__(self): yield self