forall: setenv, only encode val if encode exists
Change-Id: I655e3043d0118c4e929897d3a51e5e013e5758dc
This commit is contained in:
parent
7993f3cdda
commit
c116f94261
1 changed files with 3 additions and 1 deletions
|
@ -278,7 +278,9 @@ def DoWork(project, mirror, opt, cmd, shell, cnt, config):
|
|||
def setenv(name, val):
|
||||
if val is None:
|
||||
val = ''
|
||||
env[name] = val.encode()
|
||||
if hasattr(val, 'encode'):
|
||||
val = val.encode()
|
||||
env[name] = val
|
||||
|
||||
setenv('REPO_PROJECT', project['name'])
|
||||
setenv('REPO_PATH', project['relpath'])
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue