diff options
author | Jeff Forcier <jeff@bitprophet.org> | 2016-11-30 20:31:04 -0800 |
---|---|---|
committer | Jeff Forcier <jeff@bitprophet.org> | 2016-12-05 18:45:14 -0800 |
commit | 4a2747fbcb817f8654c285838e5a37eb4dff02a9 (patch) | |
tree | bbc270ad1ea5b9e54fc3d5a6fd118e7bde21fe39 /paramiko/channel.py | |
parent | 28c8be18c25e9d10f8e4759e489949f1e22d6346 (diff) | |
download | paramiko-4a2747fbcb817f8654c285838e5a37eb4dff02a9.tar.gz |
Cleanup / rename / doc updates / changelog, re #398
Diffstat (limited to 'paramiko/channel.py')
-rw-r--r-- | paramiko/channel.py | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/paramiko/channel.py b/paramiko/channel.py index 7735e1f1..7689b266 100644 --- a/paramiko/channel.py +++ b/paramiko/channel.py @@ -284,14 +284,16 @@ class Channel (ClosingContextManager): self.transport._send_user_message(m) @open_only - def update_environment_variables(self, environment): + def update_environment(self, environment): """ - Updates this channel's environment. This operation is additive - i.e. - the current environment is not reset before the given environment - variables are set. + Updates this channel's remote shell environment. - :param dict environment: a dictionary containing the name and respective - values to set + .. note:: + This operation is additive - i.e. the current environment is not + reset before the given environment variables are set. + + :param dict environment: + a dictionary containing the name and respective values to set :raises SSHException: if any of the environment variables was rejected by the server or the channel was closed @@ -300,7 +302,8 @@ class Channel (ClosingContextManager): try: self.set_environment_variable(name, value) except SSHException as e: - raise SSHException("Failed to set environment variable \"%s\"." % name, e) + err = "Failed to set environment variable \"{0}\"." + raise SSHException(err.format(name), e) @open_only def set_environment_variable(self, name, value): |