Add TypeError guard for docker stats (#2474)

This commit is contained in:
Joakim Sørensen 2021-01-28 11:58:04 +01:00 committed by GitHub
parent 919c383b41
commit 0307d700fa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -32,7 +32,7 @@ class DockerStats:
with suppress(KeyError):
self._calc_network(stats["networks"])
with suppress(KeyError):
with suppress(KeyError, TypeError):
self._calc_block_io(stats["blkio_stats"])
def _calc_cpu_percent(self, stats):