diff --git a/lib/galaxy/files/sources/ascp.py b/lib/galaxy/files/sources/ascp.py index 787b70c6606..32737acb42e 100644 --- a/lib/galaxy/files/sources/ascp.py +++ b/lib/galaxy/files/sources/ascp.py @@ -140,7 +140,7 @@ class AscpFilesSource(FsspecFilesSource[AscpFilesSourceTemplateConfiguration, As # Validate that exactly one of ssh_key_file or ssh_key_content is provided if config.ssh_key_file and config.ssh_key_content: - raise ValueError("Cannot specify both ssh_key_file and ssh_key_content. " "Please provide only one.") + raise ValueError("Cannot specify both ssh_key_file and ssh_key_content. Please provide only one.") if not config.ssh_key_file and not config.ssh_key_content: raise ValueError("Must specify either ssh_key_file or ssh_key_content for SSH authentication.") diff --git a/lib/galaxy/files/sources/ascp_fsspec.py b/lib/galaxy/files/sources/ascp_fsspec.py index 62fa3cfdd78..6b1439cff45 100644 --- a/lib/galaxy/files/sources/ascp_fsspec.py +++ b/lib/galaxy/files/sources/ascp_fsspec.py @@ -144,7 +144,7 @@ class AscpFileSystem(AbstractFileSystem): # Should not reach here, but just in case raise MessageException( - f"Failed to download {rpath} after {self.max_retries} attempts. " f"Last error: {last_exception}" + f"Failed to download {rpath} after {self.max_retries} attempts. Last error: {last_exception}" ) def _execute_ascp_transfer(self, rpath: str, lpath: str, attempt: int) -> None: @@ -195,7 +195,7 @@ class AscpFileSystem(AbstractFileSystem): stat_info = os.stat(key_path) mode = stat_info.st_mode & 0o777 if mode not in (0o600, 0o400): - log.warning(f"SSH key file {key_path} has permissions {oct(mode)}, " "ascp may require 0600 or 0400") + log.warning(f"SSH key file {key_path} has permissions {oct(mode)}, ascp may require 0600 or 0400") try: # If not using an existing file, create temporary file for key content @@ -367,7 +367,7 @@ class AscpFileSystem(AbstractFileSystem): raise MessageException(f"Remote file not found: {remote_path}") elif "connection" in stderr.lower() or "network" in stderr.lower(): raise MessageException( - f"Network error while downloading {remote_path}. " "Please check your network connection and try again." + f"Network error while downloading {remote_path}. Please check your network connection and try again." ) elif "timed out" in stderr.lower() or "timeout" in stderr.lower(): raise MessageException(f"Transfer timed out for {remote_path}. Please try again later.") @@ -375,7 +375,7 @@ class AscpFileSystem(AbstractFileSystem): # Generic error message error_msg = stderr or stdout or "Unknown error" raise MessageException( - f"ascp transfer failed for {remote_path} with exit code {result.returncode}. " f"Error: {error_msg}" + f"ascp transfer failed for {remote_path} with exit code {result.returncode}. Error: {error_msg}" ) def _sanitize_cmd_for_log(self, cmd: list[str]) -> str: