fence-agents: master - fencing: Pexpect problems - missing return statement

Marek GrĂ¡c marx at fedoraproject.org
Wed Apr 16 14:12:00 UTC 2014


Gitweb:        http://git.fedorahosted.org/git/?p=fence-agents.git;a=commitdiff;h=364de00cdd7619ad65f5eabdab2d8499d448045d
Commit:        364de00cdd7619ad65f5eabdab2d8499d448045d
Parent:        a61329c3e6611f0b49fe3d0eef25b35080651ebe
Author:        Marek 'marx' Grac <mgrac at redhat.com>
AuthorDate:    Wed Apr 16 16:09:47 2014 +0200
Committer:     Marek 'marx' Grac <mgrac at redhat.com>
CommitterDate: Wed Apr 16 16:09:47 2014 +0200

fencing: Pexpect problems - missing return statement

Previusly pexpect.send() returned value which was not used anywhere, with new version this is no
longer true and our inherited class fspawn has to return proper values (length of the written string)
---
 fence/agents/lib/fencing.py.py |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/fence/agents/lib/fencing.py.py b/fence/agents/lib/fencing.py.py
index 6a30ef8..63c046d 100644
--- a/fence/agents/lib/fencing.py.py
+++ b/fence/agents/lib/fencing.py.py
@@ -393,11 +393,11 @@ class fspawn(pexpect.spawn):
 
 	def send(self, message):
 		logging.debug("Sent: %s" % message)
-		pexpect.spawn.send(self, message)
+		return pexpect.spawn.send(self, message)
 
 	# send EOL according to what was detected in login process (telnet)
 	def send_eol(self, message):
-		self.send(message + self.opt["eol"])
+		return self.send(message + self.opt["eol"])
 
 def atexit_handler():
 	try:


More information about the cluster-commits mailing list