small updates after verifying vcmd return values
This commit is contained in:
parent
6b8ee13f5d
commit
ceb2e54679
1 changed files with 16 additions and 16 deletions
|
@ -70,16 +70,16 @@ class VnodeClient(object):
|
||||||
"""
|
"""
|
||||||
self._verify_connection()
|
self._verify_connection()
|
||||||
|
|
||||||
# TODO: clean this up after checking return value for qcmd
|
# run command, return process when not waiting
|
||||||
tmp = self.cmdchnl.qcmd(args)
|
p = self.cmdchnl.qcmd(args)
|
||||||
if not wait:
|
if not wait:
|
||||||
return tmp
|
return p
|
||||||
tmp = tmp.wait()
|
|
||||||
|
|
||||||
if tmp:
|
# wait for and return exit status
|
||||||
logger.warn("cmd exited with status %s: %s", tmp, args)
|
status = p.wait()
|
||||||
|
if status:
|
||||||
return tmp
|
logger.warn("cmd exited with status %s: %s", status, args)
|
||||||
|
return status
|
||||||
|
|
||||||
def cmdresult(self, args):
|
def cmdresult(self, args):
|
||||||
"""
|
"""
|
||||||
|
@ -138,16 +138,16 @@ class VnodeClient(object):
|
||||||
"""
|
"""
|
||||||
self._verify_connection()
|
self._verify_connection()
|
||||||
|
|
||||||
# TODO: clean this up after verifying redircmd return values
|
# run command, return process when not waiting
|
||||||
tmp = self.cmdchnl.redircmd(infd, outfd, errfd, args)
|
p = self.cmdchnl.redircmd(infd, outfd, errfd, args)
|
||||||
if not wait:
|
if not wait:
|
||||||
return tmp
|
return p
|
||||||
|
|
||||||
tmp = tmp.wait()
|
# wait for and return exit status
|
||||||
if tmp:
|
status = p.wait()
|
||||||
logger.warn("cmd exited with status %s: %s", tmp, args)
|
if status:
|
||||||
|
logger.warn("cmd exited with status %s: %s", status, args)
|
||||||
return tmp
|
return status
|
||||||
|
|
||||||
# TODO: validate if this is ever used
|
# TODO: validate if this is ever used
|
||||||
def term(self, sh="/bin/sh"):
|
def term(self, sh="/bin/sh"):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue