From fafd2e95a262905b74473823aa1a444ec3709e55 Mon Sep 17 00:00:00 2001
From: Christian Heller <c.heller@plomlompom.de>
Date: Sun, 24 Nov 2024 18:27:37 +0100
Subject: [PATCH] Remove exception type not used for any actual
 differentiation.

---
 ytplom/misc.py | 12 ++++--------
 1 file changed, 4 insertions(+), 8 deletions(-)

diff --git a/ytplom/misc.py b/ytplom/misc.py
index 0928fbe..9c893bd 100644
--- a/ytplom/misc.py
+++ b/ytplom/misc.py
@@ -130,10 +130,6 @@ class NotFoundException(Exception):
     """Raise on expected data missing, e.g. DB fetches finding nothing."""
 
 
-class CantWriteException(Exception):
-    """Raise when there's an obstacle to expected writing of data."""
-
-
 class HandledException(Exception):
     """Raise in any other case where we know what's happening."""
 
@@ -143,8 +139,8 @@ def _ensure_expected_dirs(expected_dirs: list[PathStr]) -> None:
     for dir_name in expected_dirs:
         if not isdir(dir_name):
             if path_exists(dir_name):
-                raise CantWriteException('at expected directory path '
-                                         f'{dir_name} found non-directory')
+                raise HandledException(f'at expected directory path {dir_name}'
+                                       'found non-directory')
             print(f'creating expected directory: {dir_name}')
             makedirs(dir_name)
 
@@ -156,8 +152,8 @@ class DatabaseConnection:
         self._path = path
         if not isfile(self._path):
             if path_exists(self._path):
-                raise CantWriteException(f'no DB at {self._path}; would create'
-                                         ', but something\'s already there?')
+                raise HandledException(f'no DB at {self._path}; would create, '
+                                       'but something\'s already there?')
             path_db_dir = dirname(self._path)
             if not isdir(path_db_dir):
                 raise NotFoundException(
-- 
2.30.2