def close(self):
if not self.connected:<EOL><INDENT>return None<EOL><DEDENT>if self.config is not None:<EOL><INDENT>if self.config.changed() and not self.config.committed():<EOL><INDENT>try:<EOL><INDENT>self.config.discard()  <EOL><DEDENT>except pyPluribus.exceptions.ConfigurationDiscardError as discarderr:  <EOL><INDENT>raise pyPluribus.exceptions.ConnectionError("<STR_LIT>".format(err=discarderr))<EOL><DEDENT><DEDENT><DEDENT>self._connection.close()  <EOL>self.config = None  <EOL>self._connection = None  <EOL>self.connected = False<EOL>
Closes the SSH connection if the connection is UP.