mirror of
https://github.com/ansible-collections/ansible.posix.git
synced 2026-01-11 07:05:27 +01:00
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:
commit
bda85b7453
1 changed files with 2 additions and 4 deletions
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Reference in a new issue