diff options
author | Gabriel Marks <gabriel.marks@mongodb.com> | 2023-01-31 15:37:36 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2023-01-31 17:49:25 +0000 |
commit | 5d28ccc2fd9b810196e95f854908269f55a66d20 (patch) | |
tree | 891d2046c8e873d1bad4e0dac3e83e4612c51e73 /buildscripts | |
parent | fb5b99865843482a181993d761d9cf176848000b (diff) | |
download | mongo-5d28ccc2fd9b810196e95f854908269f55a66d20.tar.gz |
SERVER-73280 Pass CPP variable name into condition.feature_flag
Diffstat (limited to 'buildscripts')
-rw-r--r-- | buildscripts/idl/idl/generator.py | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/buildscripts/idl/idl/generator.py b/buildscripts/idl/idl/generator.py index a6a1655d2c7..aa3b98c2c72 100644 --- a/buildscripts/idl/idl/generator.py +++ b/buildscripts/idl/idl/generator.py @@ -2493,13 +2493,8 @@ class _CppSourceFileWriter(_CppFileWriterBase): if param.condition: if param.condition.feature_flag: - ffs = [sp for sp in params if sp.name == param.condition.feature_flag] - if len(ffs) == 0: - raise ValueError("Unable to find feature flag named %s" % - (param.condition.feature_flag)) - assert len(ffs) == 1 - self._writer.write_line( - 'scp_%d->setFeatureFlag(&%s);' % (param_no, ffs[0].cpp_varname)) + self._writer.write_line('scp_%d->setFeatureFlag(&%s);' % + (param_no, param.condition.feature_flag)) if param.condition.min_fcv: self._writer.write_line( 'scp_%d->setMinFCV(FeatureCompatibilityVersionParser::parseVersion("%s"));' |