From b1de1c35f461c35f324752feebfdbb474025fd32 Mon Sep 17 00:00:00 2001 From: Tim Burke Date: Mon, 29 Jan 2024 09:09:38 -0800 Subject: [PATCH] Fix flake8 issue Change-Id: I9950da672d286de978e568d0fa6d2c350fd4ad7b --- git_review/tests/utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/git_review/tests/utils.py b/git_review/tests/utils.py index edd9deb9..56e743fb 100644 --- a/git_review/tests/utils.py +++ b/git_review/tests/utils.py @@ -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,