From: Giacomo Travaglini Date: Fri, 29 Jan 2021 22:21:16 +0000 (+0000) Subject: ext: Replace Queue.Empty with queue.empty X-Git-Tag: develop-gem5-snapshot~188 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=39046a026046d1e150647404d487218f6096d4b6;p=gem5.git ext: Replace Queue.Empty with queue.empty Queue.Empty is not an exception in python3 (Queue has been renamed to queue) Change-Id: I82555d96608094fa47990f888fd11663379547bc Signed-off-by: Giacomo Travaglini Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/40135 Maintainer: Bobby R. Bruce Reviewed-by: Jason Lowe-Power Tested-by: kokoro --- diff --git a/ext/testlib/handlers.py b/ext/testlib/handlers.py index b62322f02..fa7aea9c8 100644 --- a/ext/testlib/handlers.py +++ b/ext/testlib/handlers.py @@ -44,7 +44,7 @@ import testlib.result as result import testlib.state as state import testlib.terminal as terminal -from queue import Queue +from queue import Queue, Empty from testlib.configuration import constants @@ -383,7 +383,7 @@ class MultiprocessingHandlerWrapper(object): raise except EOFError: return - except Queue.Empty: + except Empty: continue def _drain(self): @@ -395,7 +395,7 @@ class MultiprocessingHandlerWrapper(object): raise except EOFError: return - except Queue.Empty: + except Empty: return def _handle(self, record):