diff --git a/Lib/xml/dom/__init__.py b/Lib/xml/dom/__init__.py index 5eb15aedc47..2dbb69502c0 100644 --- a/Lib/xml/dom/__init__.py +++ b/Lib/xml/dom/__init__.py @@ -67,6 +67,9 @@ def __init__(self, *args, **kw): "DOMException should not be instantiated directly") apply(Exception.__init__, (self,) + args, kw) + def _get_code(self): + return self.code + class IndexSizeErr(DOMException): code = INDEX_SIZE_ERR