Fix flake8 issue

Change-Id: I9950da672d286de978e568d0fa6d2c350fd4ad7b
This commit is contained in:
Tim Burke 2024-01-29 09:09:38 -08:00
parent 3fbead8637
commit b1de1c35f4

View File

@ -38,11 +38,11 @@ GERRIT_CONF_TMPL = """
def run_cmd(*args, **kwargs):
"""Run command and check the return code."""
preexec_fn = None
if 'chdir' in kwargs:
def preexec_fn():
return os.chdir(kwargs['chdir'])
else:
preexec_fn = None
try:
proc = subprocess.Popen(args, stdin=subprocess.PIPE,