execvp passes pep8

This commit is contained in:
Eric Windisch
2011-03-09 15:33:20 -05:00
parent 866048da04
commit f8a7c12219
2 changed files with 11 additions and 10 deletions

View File

@@ -40,7 +40,7 @@ import netaddr
from eventlet import event
from eventlet import greenthread
from eventlet.green import subprocess
None
from nova import exception
from nova.exception import ProcessExecutionError
from nova import log as logging
@@ -151,7 +151,8 @@ def execute(*cmd, **kwargs):
obj.stdin.close()
if 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
raise ProcessExecutionError(exit_code=obj.returncode,
stdout=stdout,