def open_only(func):
@wraps(func)<EOL>def _check(self, *args, **kwds):<EOL><INDENT>if (<EOL>self.closed<EOL>or self.eof_received<EOL>or self.eof_sent<EOL>or not self.active<EOL>):<EOL><INDENT>raise SSHException("<STR_LIT>")<EOL><DEDENT>return func(self, *args, **kwds)<EOL><DEDENT>return _check<EOL>
Decorator for `.Channel` methods which performs an openness check.

:raises:
    `.SSHException` -- If the wrapped method is called on an unopened
    `.Channel`.