def __exit__(self, type_=None, value=None, traceback=None):
if type_ is not None and issubclass(self.exc, type_):<EOL><INDENT>for attr, attr_value in self.attrs.items():<EOL><INDENT>if not hasattr(value, attr):<EOL><INDENT>break<EOL><DEDENT>if getattr(value, attr) != attr_value:<EOL><INDENT>break<EOL><DEDENT><DEDENT>else:<EOL><INDENT>raise ResourceDenied("<STR_LIT>")<EOL><DEDENT><DEDENT>
If type_ is a subclass of self.exc and value has attributes matching
        self.attrs, raise ResourceDenied.  Otherwise let the exception
        propagate (if any).