tests: Use clearer syntax for empty generator

Placing 'yield' after a 'return' is dark magic, even if it's technically
allowed. Use 'yield from' instead.

Change-Id: Ie5e8befcbeeb42094d1056e00c939e384a72ceb3
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
This commit is contained in:
Stephen Finucane 2023-12-07 11:49:50 +00:00
parent 259b646afa
commit a176d524c6

View File

@ -48,8 +48,7 @@ def get_node(*args, **kwargs):
def ports(*args, **kwargs):
# return an empty generator
return
yield
yield from ()
fake_client = mock.create_autospec(baremetal_proxy.Proxy)