mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 01:18:58 +00:00
Add additional check to doubly surely prevent infinite loops.
This commit is contained in:
parent
24f8e0c7a2
commit
459e0378b7
@ -639,7 +639,7 @@ def _iostat_fbsd(interval, count, disks):
|
||||
continue
|
||||
elif not len(dev_header):
|
||||
dev_header = line.split()[1:]
|
||||
while True:
|
||||
while line is not False:
|
||||
line = next(ret, False)
|
||||
if not line or not line[0].isalnum():
|
||||
break
|
||||
@ -695,7 +695,7 @@ def _iostat_linux(interval, count, disks):
|
||||
elif line.startswith('Device:'):
|
||||
if not len(dev_header):
|
||||
dev_header = tuple(line.split()[1:])
|
||||
while True:
|
||||
while line is not False:
|
||||
line = next(ret, False)
|
||||
if not line or not line[0].isalnum():
|
||||
break
|
||||
|
Loading…
Reference in New Issue
Block a user