Skip to content

Commit 97ea49f

Browse files
committed
Bug 1257516 - Allow to assign Exceptions in the global scope. r=ted
But do not advertise it too much.
1 parent c7b519d commit 97ea49f

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

python/mozbuild/mozbuild/configure/__init__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,8 @@ def __setitem__(self, key, value):
232232
raise KeyError('Cannot reassign builtins')
233233

234234
if (not isinstance(value, DummyFunction) and
235-
value not in self._templates):
235+
value not in self._templates and
236+
not issubclass(value, Exception)):
236237
raise KeyError('Cannot assign `%s` because it is neither a '
237238
'@depends nor a @template' % key)
238239

0 commit comments

Comments
 (0)