summaryrefslogtreecommitdiff
path: root/mesonbuild/options.py
diff options
context:
space:
mode:
authorDylan Baker <dylan@pnwbakers.com>2025-04-04 10:00:19 -0700
committerDylan Baker <dylan@pnwbakers.com>2025-04-08 10:00:16 -0700
commit768712cf32e82ee9e82e6d567f2a39677b48e46c (patch)
tree03cc2e6acea5cb4ef05af178ccbc1db6f4cff26a /mesonbuild/options.py
parent4c1d1da9b6a1e3f144d26dbc73f9d02f4f7f7e97 (diff)
downloadmeson-768712cf32e82ee9e82e6d567f2a39677b48e46c.tar.gz
options: fix an assertion that is incorrect
The key can be an OptionKey, particularly in the next patch.
Diffstat (limited to 'mesonbuild/options.py')
-rw-r--r--mesonbuild/options.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/mesonbuild/options.py b/mesonbuild/options.py
index 8a7b7ec3b..2f7663af3 100644
--- a/mesonbuild/options.py
+++ b/mesonbuild/options.py
@@ -1323,8 +1323,10 @@ class OptionStore:
#
# The key parsing function can not handle the difference between the two
# and defaults to A.
- assert isinstance(keystr, str)
- key = OptionKey.from_string(keystr)
+ if isinstance(keystr, str):
+ key = OptionKey.from_string(keystr)
+ else:
+ key = keystr
# Due to backwards compatibility we ignore all cross options when building
# natively.
if not self.is_cross and key.is_for_build():