Skip to content

Commit fba3864

Browse files
committed
GitRepository: slightly change handling of extra_env arg
No need to build 'env' arg for popen when extra_env is empty. In some methods an empty dict is used to indicate "no extra env". This commit does not affect the output/outcome of GitRepository operations, but, just makes the code a tiny bit sleeker. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
1 parent b95260a commit fba3864

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

gbp/git/repository.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ def __init__(self, path, toplevel=True):
134134
def __build_env(extra_env):
135135
"""Prepare environment for subprocess calls"""
136136
env = None
137-
if extra_env is not None:
137+
if extra_env:
138138
env = os.environ.copy()
139139
env.update(extra_env)
140140
return env

0 commit comments

Comments
 (0)