Fix flake8 issue
Change-Id: I9950da672d286de978e568d0fa6d2c350fd4ad7b
This commit is contained in:
parent
3fbead8637
commit
b1de1c35f4
@ -38,11 +38,11 @@ GERRIT_CONF_TMPL = """
|
|||||||
|
|
||||||
def run_cmd(*args, **kwargs):
|
def run_cmd(*args, **kwargs):
|
||||||
"""Run command and check the return code."""
|
"""Run command and check the return code."""
|
||||||
preexec_fn = None
|
|
||||||
|
|
||||||
if 'chdir' in kwargs:
|
if 'chdir' in kwargs:
|
||||||
def preexec_fn():
|
def preexec_fn():
|
||||||
return os.chdir(kwargs['chdir'])
|
return os.chdir(kwargs['chdir'])
|
||||||
|
else:
|
||||||
|
preexec_fn = None
|
||||||
|
|
||||||
try:
|
try:
|
||||||
proc = subprocess.Popen(args, stdin=subprocess.PIPE,
|
proc = subprocess.Popen(args, stdin=subprocess.PIPE,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user