mirror of
https://github.com/Dev-Wiki/git-repo.git
synced 2025-02-23 23:27:27 +08: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