From a9a5b4b66bae55a75499ff3446972113d8cdf4e6 Mon Sep 17 00:00:00 2001 From: Ben Clifford Date: Tue, 3 Dec 2024 16:36:47 +0000 Subject: [PATCH] Remove now-unused channel errors (#3713) The final use of channel errors was removed in PR #3690 This is part of #3515 channel removal project # Changed Behaviour Any user catching these errors explicitly will now get an error about the exceptions being undefined. Because these don't exist any more, it should be safe to remove those catches. ## Type of change - Code maintenance/cleanup --- docs/reference.rst | 2 -- parsl/channels/errors.py | 30 ------------------------------ 2 files changed, 32 deletions(-) delete mode 100644 parsl/channels/errors.py diff --git a/docs/reference.rst b/docs/reference.rst index 45f83ad36f..d4c70dd7bd 100644 --- a/docs/reference.rst +++ b/docs/reference.rst @@ -169,8 +169,6 @@ Exceptions parsl.providers.errors.ScaleOutFailed parsl.providers.errors.SchedulerMissingArgs parsl.providers.errors.ScriptPathError - parsl.channels.errors.ChannelError - parsl.channels.errors.FileCopyException parsl.executors.high_throughput.errors.WorkerLost parsl.executors.high_throughput.interchange.ManagerLost parsl.serialize.errors.DeserializationError diff --git a/parsl/channels/errors.py b/parsl/channels/errors.py deleted file mode 100644 index effaea9548..0000000000 --- a/parsl/channels/errors.py +++ /dev/null @@ -1,30 +0,0 @@ -''' Exceptions raise by Apps. -''' -from parsl.errors import ParslError - - -class ChannelError(ParslError): - """ Base class for all exceptions - - Only to be invoked when only a more specific error is not available. - """ - def __init__(self, reason: str, e: Exception, hostname: str) -> None: - self.reason = reason - self.e = e - self.hostname = hostname - - def __str__(self) -> str: - return "Hostname:{0}, Reason:{1}".format(self.hostname, self.reason) - - -class FileCopyException(ChannelError): - ''' File copy operation failed - - Contains: - reason(string) - e (paramiko exception object) - hostname (string) - ''' - - def __init__(self, e: Exception, hostname: str) -> None: - super().__init__("File copy failed due to {0}".format(e), e, hostname)