Vinzenz Feenstra has uploaded a new change for review.

Change subject: virt: Fix @staticmethod usage in guest agent
......................................................................

virt: Fix @staticmethod usage in guest agent

For some reason the usage of the staticmethod decorator in the guest agent
class has been completely wrong.
This patches fixes the usage of it.

Change-Id: Icaadf151eaf86f13d2574d4f4c14ce64f9a819a7
Signed-off-by: Vinzenz Feenstra <[email protected]>
---
M vdsm/virt/guestagent.py
1 file changed, 2 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/56/50656/1

diff --git a/vdsm/virt/guestagent.py b/vdsm/virt/guestagent.py
index 9542cbe..1f2a748 100644
--- a/vdsm/virt/guestagent.py
+++ b/vdsm/virt/guestagent.py
@@ -211,13 +211,11 @@
         sock.setblocking(0)
         return sock
 
-    @staticmethod
     def _create(self):
         self._sock.close()
         self._sock = self._create_socket()
         return self._sock.fileno()
 
-    @staticmethod
     def _connect(self):
         ret = False
         try:
@@ -426,7 +424,6 @@
         self.log.debug("setNumberOfCPUs('%d') called", count)
         self._forward('set-number-of-cpus', {'count': count})
 
-    @staticmethod
     def _onChannelTimeout(self):
         self.guestInfo['memUsage'] = 0
         if self.guestStatus not in (vmstatus.POWERING_DOWN,
@@ -469,7 +466,6 @@
             self._messageState = MessageState.TOO_BIG
             self._clearReadBuffer()
 
-    @staticmethod
     def _onChannelRead(self):
         result = True
         try:
@@ -489,7 +485,8 @@
 
         return result
 
-    def _parseLine(self, line):
+    @staticmethod
+    def _parseLine(line):
         # Deal with any bad UTF8 encoding from the (untrusted) guest,
         # by replacing them with the Unicode replacement character
         uniline = line.decode('utf8', 'replace')


-- 
To view, visit https://gerrit.ovirt.org/50656
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Icaadf151eaf86f13d2574d4f4c14ce64f9a819a7
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Vinzenz Feenstra <[email protected]>
_______________________________________________
vdsm-patches mailing list
[email protected]
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches

Reply via email to