From d6dba38808a0a2d4c7e2ae07e57196ed64f9b6f8 Mon Sep 17 00:00:00 2001 From: Ben Clifford Date: Thu, 7 Nov 2024 14:45:38 +0000 Subject: [PATCH] Remove now-unused exceptions related to former SSH channels (#3681) See PR #3677 for removal of SSH channel code, and issue #3515 for an overall channel removal. ## Type of change - Code maintenance/cleanup --- docs/reference.rst | 5 --- parsl/channels/errors.py | 67 ---------------------------------------- 2 files changed, 72 deletions(-) diff --git a/docs/reference.rst b/docs/reference.rst index 1424e08106..45f83ad36f 100644 --- a/docs/reference.rst +++ b/docs/reference.rst @@ -170,11 +170,6 @@ Exceptions parsl.providers.errors.SchedulerMissingArgs parsl.providers.errors.ScriptPathError parsl.channels.errors.ChannelError - parsl.channels.errors.BadHostKeyException - parsl.channels.errors.BadScriptPath - parsl.channels.errors.BadPermsScriptPath - parsl.channels.errors.AuthException - parsl.channels.errors.SSHException parsl.channels.errors.FileCopyException parsl.executors.high_throughput.errors.WorkerLost parsl.executors.high_throughput.interchange.ManagerLost diff --git a/parsl/channels/errors.py b/parsl/channels/errors.py index 1621c49a44..effaea9548 100644 --- a/parsl/channels/errors.py +++ b/parsl/channels/errors.py @@ -17,73 +17,6 @@ def __str__(self) -> str: return "Hostname:{0}, Reason:{1}".format(self.hostname, self.reason) -class BadHostKeyException(ChannelError): - ''' SSH channel could not be created since server's host keys could not - be verified - - Contains: - reason(string) - e (paramiko exception object) - hostname (string) - ''' - - def __init__(self, e: Exception, hostname: str) -> None: - super().__init__("SSH channel could not be created since server's host keys could not be " - "verified", e, hostname) - - -class BadScriptPath(ChannelError): - ''' An error raised during execution of an app. - What this exception contains depends entirely on context - Contains: - reason(string) - e (paramiko exception object) - hostname (string) - ''' - - def __init__(self, e: Exception, hostname: str) -> None: - super().__init__("Inaccessible remote script dir. Specify script_dir", e, hostname) - - -class BadPermsScriptPath(ChannelError): - ''' User does not have permissions to access the script_dir on the remote site - - Contains: - reason(string) - e (paramiko exception object) - hostname (string) - ''' - - def __init__(self, e: Exception, hostname: str) -> None: - super().__init__("User does not have permissions to access the script_dir", e, hostname) - - -class AuthException(ChannelError): - ''' An error raised during execution of an app. - What this exception contains depends entirely on context - Contains: - reason(string) - e (paramiko exception object) - hostname (string) - ''' - - def __init__(self, e: Exception, hostname: str) -> None: - super().__init__("Authentication to remote server failed", e, hostname) - - -class SSHException(ChannelError): - ''' if there was any other error connecting or establishing an SSH session - - Contains: - reason(string) - e (paramiko exception object) - hostname (string) - ''' - - def __init__(self, e: Exception, hostname: str) -> None: - super().__init__("Error connecting or establishing an SSH session", e, hostname) - - class FileCopyException(ChannelError): ''' File copy operation failed