Change in vdsm[master]: vm: drop redundant hasattr()
fromani at redhat.com
fromani at redhat.com
Tue Jun 24 07:37:23 UTC 2014
Francesco Romani has uploaded a new change for review.
Change subject: vm: drop redundant hasattr()
......................................................................
vm: drop redundant hasattr()
I don't see how it is possible for a Vm instance to *not* have the
updateGuestCpuRunning method, therefore I remove the hasattr() check
before to call it.
Change-Id: I23743b7c6f4a8b71a301d02670c348d53f23f124
Signed-off-by: Francesco Romani <fromani at redhat.com>
---
M vdsm/virt/vm.py
1 file changed, 2 insertions(+), 4 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/12/29112/1
diff --git a/vdsm/virt/vm.py b/vdsm/virt/vm.py
index 2b28473..d145122 100644
--- a/vdsm/virt/vm.py
+++ b/vdsm/virt/vm.py
@@ -2617,8 +2617,7 @@
self.log.error('cannot cont while %s', self.lastStatus)
return errCode['unexpected']
self._underlyingCont()
- if hasattr(self, 'updateGuestCpuRunning'):
- self.updateGuestCpuRunning()
+ self.updateGuestCpuRunning()
self._lastStatus = afterState
try:
with self._confLock:
@@ -2638,8 +2637,7 @@
with self._confLock:
self.conf['pauseCode'] = pauseCode
self._underlyingPause()
- if hasattr(self, 'updateGuestCpuRunning'):
- self.updateGuestCpuRunning()
+ self.updateGuestCpuRunning()
self._lastStatus = afterState
return {'status': doneCode, 'output': ['']}
finally:
--
To view, visit http://gerrit.ovirt.org/29112
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I23743b7c6f4a8b71a301d02670c348d53f23f124
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Francesco Romani <fromani at redhat.com>
More information about the vdsm-patches
mailing list