diff --git a/python/mozbuild/mozbuild/frontend/reader.py b/python/mozbuild/mozbuild/frontend/reader.py index 4eb597d3b634..cf532678656a 100644 --- a/python/mozbuild/mozbuild/frontend/reader.py +++ b/python/mozbuild/mozbuild/frontend/reader.py @@ -219,6 +219,8 @@ class MozbuildSandbox(Sandbox): return Sandbox.__contains__(self, key) def __setitem__(self, key, value): + if key in self.special_variables and value is self[key]: + return if key in self.special_variables or key in self.functions or key in self.subcontext_types: raise KeyError('Cannot set "%s" because it is a reserved keyword' % key)