diff options
author | Dylan Baker <dylan@pnwbakers.com> | 2021-08-18 11:14:10 -0700 |
---|---|---|
committer | Dylan Baker <dylan@pnwbakers.com> | 2021-08-30 18:05:02 -0700 |
commit | d6a1f85248e80650d628d969212a06992d1b8f4c (patch) | |
tree | 9a78c802f79cef3fe2e87db7ce491a86f4f09388 | |
parent | 940fc372dbe8a7e28a4868be51b15c85a0630365 (diff) | |
download | meson-d6a1f85248e80650d628d969212a06992d1b8f4c.zip meson-d6a1f85248e80650d628d969212a06992d1b8f4c.tar.gz meson-d6a1f85248e80650d628d969212a06992d1b8f4c.tar.bz2 |
Allow EnvironmentVariablesObject to be passed an EnvironmentVariables instance
-rw-r--r-- | mesonbuild/interpreter/interpreterobjects.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/mesonbuild/interpreter/interpreterobjects.py b/mesonbuild/interpreter/interpreterobjects.py index d524059..c614f09 100644 --- a/mesonbuild/interpreter/interpreterobjects.py +++ b/mesonbuild/interpreter/interpreterobjects.py @@ -241,7 +241,9 @@ class EnvironmentVariablesObject(MutableInterpreterObject, MesonInterpreterObjec 'append': self.append_method, 'prepend': self.prepend_method, }) - if isinstance(initial_values, dict): + if isinstance(initial_values, build.EnvironmentVariables): + self.vars = initial_values + elif isinstance(initial_values, dict): for k, v in initial_values.items(): self.set_method([k, v], {}) elif initial_values is not None: |