Change in vdsm[master]: virt: sampling: more cautious disk stats check
fromani at redhat.com
fromani at redhat.com
Tue Sep 30 21:34:08 UTC 2014
Francesco Romani has posted comments on this change.
Change subject: virt: sampling: more cautious disk stats check
......................................................................
Patch Set 2:
(1 comment)
http://gerrit.ovirt.org/#/c/33482/2/vdsm/virt/vm.py
File vdsm/virt/vm.py:
Line 539: dStats['imageID'] = vmDrive.imageID
Line 540: elif "GUID" in vmDrive:
Line 541: dStats['lunGUID'] = vmDrive.GUID
Line 542: if (sInfo and vmDrive.name in sInfo and
Line 543: eInfo and vmDrive.name in eInfo):
> I think pep8 would not like this, eInfo should be indented one extra space.
I thought the same, but seems like pep8 thinks in reverse and complains if I *add* the extra space:
1009 23:32:50 fromani at musashi ~/Projects/upstream/vdsm $ git diff
diff --git a/vdsm/virt/vm.py b/vdsm/virt/vm.py
index 7f21085..10cd21e 100644
--- a/vdsm/virt/vm.py
+++ b/vdsm/virt/vm.py
@@ -540,7 +540,7 @@ class VmStatsThread(AdvancedStatsThread):
elif "GUID" in vmDrive:
dStats['lunGUID'] = vmDrive.GUID
if (sInfo and vmDrive.name in sInfo and
- eInfo and vmDrive.name in eInfo):
+ eInfo and vmDrive.name in eInfo):
# will be None if sampled during recovery
dStats.update(self._calcDiskRate(vmDrive, sInfo, eInfo,
sampleInterval))
1010 23:32:52 fromani at musashi ~/Projects/upstream/vdsm $ make pep8
/usr/bin/pep8 --version
1.5.6
for x in config.py constants.py crossImportsTests.py vdsm.py ; do \
exclude="${exclude},${x}" ; \
done ; \
/usr/bin/pep8 --exclude="${exclude}" --filename '*.py,*.py.in' .
./vdsm/virt/vm.py:543:21: E129 visually indented line with same indent as next logical line
make: *** [pep8] Error 1
Line 544: # will be None if sampled during recovery
Line 545: dStats.update(self._calcDiskRate(vmDrive, sInfo, eInfo,
Line 546: sampleInterval))
Line 547: except (AttributeError, TypeError, ZeroDivisionError):
--
To view, visit http://gerrit.ovirt.org/33482
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I059b69c33d45950f8377597ee8c6e7824e1ec223
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Francesco Romani <fromani at redhat.com>
Gerrit-Reviewer: Adam Litke <alitke at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Francesco Romani <fromani at redhat.com>
Gerrit-Reviewer: Nir Soffer <nsoffer at redhat.com>
Gerrit-Reviewer: automation at ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
More information about the vdsm-patches
mailing list