execvp passes pep8
This commit is contained in:
@@ -40,7 +40,7 @@ import netaddr
|
|||||||
from eventlet import event
|
from eventlet import event
|
||||||
from eventlet import greenthread
|
from eventlet import greenthread
|
||||||
from eventlet.green import subprocess
|
from eventlet.green import subprocess
|
||||||
|
None
|
||||||
from nova import exception
|
from nova import exception
|
||||||
from nova.exception import ProcessExecutionError
|
from nova.exception import ProcessExecutionError
|
||||||
from nova import log as logging
|
from nova import log as logging
|
||||||
@@ -151,7 +151,8 @@ def execute(*cmd, **kwargs):
|
|||||||
obj.stdin.close()
|
obj.stdin.close()
|
||||||
if obj.returncode:
|
if obj.returncode:
|
||||||
LOG.debug(_("Result was %s") % obj.returncode)
|
LOG.debug(_("Result was %s") % obj.returncode)
|
||||||
if check_exit_code is not None and obj.returncode != check_exit_code:
|
if type(check_exit_code) == types.IntType \
|
||||||
|
and obj.returncode != check_exit_code:
|
||||||
(stdout, stderr) = result
|
(stdout, stderr) = result
|
||||||
raise ProcessExecutionError(exit_code=obj.returncode,
|
raise ProcessExecutionError(exit_code=obj.returncode,
|
||||||
stdout=stdout,
|
stdout=stdout,
|
||||||
|
|||||||
Reference in New Issue
Block a user