@open_only<EOL><INDENT>def update_environment(self, environment):<DEDENT>
for name, value in environment.items():<EOL><INDENT>try:<EOL><INDENT>self.set_environment_variable(name, value)<EOL><DEDENT>except SSHException as e:<EOL><INDENT>err = '<STR_LIT>'<EOL>raise SSHException(err.format(name), e)<EOL><DEDENT><DEDENT>
Updates this channel's remote shell environment.

.. note::
    This operation is additive - i.e. the current environment is not
    reset before the given environment variables are set.

.. warning::
    Servers may silently reject some environment variables; see the
    warning in `set_environment_variable` for details.

: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