mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2025-11-16 12:34:45 +00:00
build: Simplify wscript code
This commit is contained in:
committed by
Gedare Bloom
parent
3225f69db6
commit
a85402f76f
9
wscript
9
wscript
@@ -110,12 +110,9 @@ class EnvWrapper(object):
|
||||
self._env = env
|
||||
|
||||
def __getitem__(self, name):
|
||||
fields = name.split(":")
|
||||
v = self._env[fields[0]]
|
||||
try:
|
||||
fmt = "{:" + fields[1] + "}"
|
||||
except IndexError:
|
||||
fmt = "{}"
|
||||
k, c, f = name.partition(":")
|
||||
v = self._env[k]
|
||||
fmt = "{" + c + f + "}"
|
||||
if isinstance(v, list):
|
||||
return " ".join([fmt.format(w) for w in v])
|
||||
return fmt.format(v)
|
||||
|
||||
Reference in New Issue
Block a user