EventLoop: fix inverted may_block logic
authorZac Medico <zmedico@gentoo.org>
Thu, 9 Feb 2012 07:25:09 +0000 (23:25 -0800)
committerZac Medico <zmedico@gentoo.org>
Thu, 9 Feb 2012 07:25:09 +0000 (23:25 -0800)
This caused emerge to consume 100% cpu.

pym/portage/util/_eventloop/EventLoop.py

index c2ba1f2cd696cd3c2fef2dff1f39af21d3b60da4..3f4d354455372e572aad2f973fafc553c13f0953 100644 (file)
@@ -157,9 +157,9 @@ class EventLoop(object):
 
                if not self._poll_event_queue:
                        if may_block:
-                               timeout = 0
-                       else:
                                timeout = None
+                       else:
+                               timeout = 0
                        self._poll(timeout=timeout)
 
                try: