Skip to content

Commit 77b915a

Browse files
authored
Merge cd0f5b6 into 3454228
2 parents 3454228 + cd0f5b6 commit 77b915a

1 file changed

Lines changed: 15 additions & 2 deletions

File tree

source/config/__init__.py

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
from . import profileUpgrader
3636
from .configSpec import confspec
3737
from .featureFlag import (
38+
FeatureFlag,
3839
_transformSpec_AddFeatureFlagDefault,
3940
_validateConfig_featureFlag,
4041
)
@@ -1243,8 +1244,20 @@ def __setitem__(self, key, val):
12431244
except KeyError:
12441245
pass
12451246
else:
1246-
if val == curVal:
1247-
# The value isn't different, so there's nothing to do.
1247+
if (
1248+
(
1249+
# FeatureFlag overrides __eq___
1250+
not isinstance(val, FeatureFlag)
1251+
and val == curVal
1252+
)
1253+
or (
1254+
# FeatureFlag overrides __eq___
1255+
isinstance(val, FeatureFlag)
1256+
and val.value == curVal.value
1257+
)
1258+
):
1259+
# If the value is unchanged, do not update
1260+
# or mark the profile as dirty
12481261
return
12491262

12501263
# Set this value in the most recently activated profile.

0 commit comments

Comments
 (0)