Francesco Romani has uploaded a new change for review.
Change subject: vmstats: TypeError is unlikely with modern libvirt
......................................................................
vmstats: TypeError is unlikely with modern libvirt
Modern libvirts, which we already require, make
use of virTypedParameter, which the Python
bindings make safe to transform in the proper
native types.
Thus, a TypeError is highly unlikely those days.
Change-Id: I937d7cf0107ea2285f937c3af0f44e5843fad224
Signed-off-by: Francesco Romani <fromani(a)redhat.com>
---
M vdsm/virt/vmstats.py
1 file changed, 2 insertions(+), 2 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/17/40917/1
diff --git a/vdsm/virt/vmstats.py b/vdsm/virt/vmstats.py
index 11feead..acb2534 100644
--- a/vdsm/virt/vmstats.py
+++ b/vdsm/virt/vmstats.py
@@ -93,7 +93,7 @@
- _diff(last_sample, first_sample, 'cpu.system'),
interval)
- except (KeyError, TypeError) as e:
+ except KeyError as e:
logging.exception("CPU stats not available: %s", e)
@@ -228,7 +228,7 @@
drive_stats['readBytes'] = str(drive_info['rd.bytes'])
drive_stats['writtenBytes'] =
str(drive_info['wr.bytes'])
- except (AttributeError, TypeError):
+ except AttributeError:
logging.exception("Disk %s stats not available",
vm_drive.name)
--
To view, visit
https://gerrit.ovirt.org/40917
To unsubscribe, visit
https://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I937d7cf0107ea2285f937c3af0f44e5843fad224
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Francesco Romani <fromani(a)redhat.com>