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:
parent
259b646afa
commit
a176d524c6
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user