aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild
diff options
context:
space:
mode:
authorXavier Claessens <xavier.claessens@collabora.com>2021-08-09 14:31:54 -0400
committerXavier Claessens <xclaesse@gmail.com>2021-08-09 16:42:23 -0400
commit27b319526c5114a63c63f00c46c4696722e71f56 (patch)
tree6c0dc7a09902ef0d083a9c3c25613e6031ef8651 /mesonbuild
parentd9acd7505c405e184f76c90b36aec2e6edb719a7 (diff)
downloadmeson-27b319526c5114a63c63f00c46c4696722e71f56.zip
meson-27b319526c5114a63c63f00c46c4696722e71f56.tar.gz
meson-27b319526c5114a63c63f00c46c4696722e71f56.tar.bz2
interpreter: Fix spurious warning in configure_data()
This is a regression when porting to typed_pos_args().
Diffstat (limited to 'mesonbuild')
-rw-r--r--mesonbuild/interpreter/interpreter.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/mesonbuild/interpreter/interpreter.py b/mesonbuild/interpreter/interpreter.py
index d4d6bb1..b527115 100644
--- a/mesonbuild/interpreter/interpreter.py
+++ b/mesonbuild/interpreter/interpreter.py
@@ -955,9 +955,9 @@ external dependencies (including libraries) must go to "dependencies".''')
@typed_pos_args('configuration_data', optargs=[dict])
@noKwargs
def func_configuration_data(self, node: mparser.BaseNode, args: T.Optional[dict], kwargs: 'TYPE_kwargs') -> ConfigurationDataObject:
- if args is not None:
+ initial_values = args[0]
+ if initial_values is not None:
FeatureNew.single_use('configuration_data dictionary', '0.49.0', self.subproject)
- initial_values = args[0]
else:
initial_values = {}
return ConfigurationDataObject(self.subproject, initial_values)