Comparing None to an integer worked in Python 2, but fails in Python 3.
Signed-off-by: Russell Bryant <russell@ovn.org>
Acked-by: Ben Pfaff <blp@ovn.org>
"""Causes the next call to poller.block() to wake up when self.run()
should be called."""
timeout = self.timeout(now)
"""Causes the next call to poller.block() to wake up when self.run()
should be called."""
timeout = self.timeout(now)
+ if timeout is not None and timeout >= 0:
poller.timer_wait(timeout)
def timeout(self, now):
poller.timer_wait(timeout)
def timeout(self, now):
def do_timeout(_):
global now
timeout = r.timeout(now)
def do_timeout(_):
global now
timeout = r.timeout(now)
+ if timeout is not None and timeout >= 0:
print(" advance %d ms" % timeout)
now += timeout
else:
print(" advance %d ms" % timeout)
now += timeout
else: