summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--paramiko/channel.py16
1 files changed, 8 insertions, 8 deletions
diff --git a/paramiko/channel.py b/paramiko/channel.py
index 38772283..dadfe184 100644
--- a/paramiko/channel.py
+++ b/paramiko/channel.py
@@ -44,7 +44,7 @@ from paramiko import pipe
MIN_PACKET_SIZE = 1024
-def requires_open_channel(func):
+def open_only(func):
"""
Decorator for `.Channel` methods which performs an openness check.
@@ -143,7 +143,7 @@ class Channel (object):
out += '>'
return out
- @requires_open_channel
+ @open_only
def get_pty(self, term='vt100', width=80, height=24, width_pixels=0,
height_pixels=0):
"""
@@ -177,7 +177,7 @@ class Channel (object):
self.transport._send_user_message(m)
self._wait_for_event()
- @requires_open_channel
+ @open_only
def invoke_shell(self):
"""
Request an interactive shell session on this channel. If the server
@@ -203,7 +203,7 @@ class Channel (object):
self.transport._send_user_message(m)
self._wait_for_event()
- @requires_open_channel
+ @open_only
def exec_command(self, command):
"""
Execute a command on the server. If the server allows it, the channel
@@ -229,7 +229,7 @@ class Channel (object):
self.transport._send_user_message(m)
self._wait_for_event()
- @requires_open_channel
+ @open_only
def invoke_subsystem(self, subsystem):
"""
Request a subsystem on the server (for example, ``sftp``). If the
@@ -254,7 +254,7 @@ class Channel (object):
self.transport._send_user_message(m)
self._wait_for_event()
- @requires_open_channel
+ @open_only
def resize_pty(self, width=80, height=24, width_pixels=0, height_pixels=0):
"""
Resize the pseudo-terminal. This can be used to change the width and
@@ -330,7 +330,7 @@ class Channel (object):
m.add_int(status)
self.transport._send_user_message(m)
- @requires_open_channel
+ @open_only
def request_x11(self, screen_number=0, auth_protocol=None, auth_cookie=None,
single_connection=False, handler=None):
"""
@@ -391,7 +391,7 @@ class Channel (object):
self.transport._set_x11_handler(handler)
return auth_cookie
- @requires_open_channel
+ @open_only
def request_forward_agent(self, handler):
"""
Request for a forward SSH Agent on this channel.