mirror of
https://gerrit.googlesource.com/git-repo
synced 2024-12-21 07:16:21 +00:00
forall: setenv, only encode val if encode exists
Change-Id: I655e3043d0118c4e929897d3a51e5e013e5758dc
This commit is contained in:
parent
7993f3cdda
commit
c116f94261
@ -278,7 +278,9 @@ def DoWork(project, mirror, opt, cmd, shell, cnt, config):
|
|||||||
def setenv(name, val):
|
def setenv(name, val):
|
||||||
if val is None:
|
if val is None:
|
||||||
val = ''
|
val = ''
|
||||||
env[name] = val.encode()
|
if hasattr(val, 'encode'):
|
||||||
|
val = val.encode()
|
||||||
|
env[name] = val
|
||||||
|
|
||||||
setenv('REPO_PROJECT', project['name'])
|
setenv('REPO_PROJECT', project['name'])
|
||||||
setenv('REPO_PATH', project['relpath'])
|
setenv('REPO_PATH', project['relpath'])
|
||||||
|
Loading…
Reference in New Issue
Block a user