Merge pull request #541 from saito-hideki/pr/replace_yield

[CI] Replaced yield with yield from for sanity test

SUMMARY
Replaced yield with yield from to address latest sanity test.
ISSUE TYPE

CI Tests Pull Request

COMPONENT NAME

ansible.posix

ADDITIONAL INFORMATION
None
This commit is contained in:
softwarefactory-project-zuul[bot] 2024-03-26 05:51:09 +00:00 committed by GitHub
commit bda85b7453
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -64,8 +64,7 @@ if sys.version_info >= (3,) and sys.version_info < (3, 4, 4):
# newline that our naive format() added
data_as_list[-1] = data_as_list[-1][:-1]
for line in data_as_list:
yield line
yield from data_as_list
def mock_open(mock=None, read_data=''):
"""
@ -93,8 +92,7 @@ if sys.version_info >= (3,) and sys.version_info < (3, 4, 4):
if handle.readline.return_value is not None:
while True:
yield handle.readline.return_value
for line in _data:
yield line
yield from _data
global file_spec
if file_spec is None: