Skip to content

Commit 50886f1

Browse files
refactor: Remove unused ConfigurationError exception class (#41)
The ConfigurationError exception class was defined but never raised or caught anywhere in the codebase. This dead code added unnecessary lines to the exceptions module with no functional purpose. Co-authored-by: Claude <noreply@anthropic.com>
1 parent 2d72873 commit 50886f1

File tree

2 files changed

+17
-13
lines changed

2 files changed

+17
-13
lines changed

progress.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -263,3 +263,20 @@ Users can use `remote ami list-templates` which provides the same functionality
263263
**Changes:**
264264
- Removed the `list_launch_templates()` function from `remote/instance.py`
265265
- Removed the corresponding test `test_list_launch_templates_command()` from `tests/test_instance.py`
266+
267+
---
268+
269+
## 2026-01-18: Remove unused `ConfigurationError` exception class
270+
271+
**File:** `remote/exceptions.py`
272+
273+
**Issue:** The `ConfigurationError` exception class (lines 132-142) was defined but never used anywhere in the codebase:
274+
1. No code raised this exception
275+
2. No code caught this exception
276+
3. No tests referenced this exception class
277+
4. The class was complete dead code adding unnecessary lines to the module
278+
279+
The exception was designed for configuration-related errors but was never integrated into the config handling code.
280+
281+
**Changes:**
282+
- Removed the `ConfigurationError` class definition from `remote/exceptions.py`

remote/exceptions.py

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -129,19 +129,6 @@ def _get_user_friendly_message(self, error_code: str, original_message: str) ->
129129
return error_mappings.get(error_code, f"AWS Error: {original_message}")
130130

131131

132-
class ConfigurationError(RemotePyError):
133-
"""Raised when there are configuration-related errors."""
134-
135-
def __init__(self, config_issue: str, details: str | None = None):
136-
message = f"Configuration error: {config_issue}"
137-
if not details:
138-
details = (
139-
"Check your configuration file at ~/.config/remote.py/config.ini\n"
140-
"Run 'remote config show' to view current configuration"
141-
)
142-
super().__init__(message, details)
143-
144-
145132
class ResourceNotFoundError(RemotePyError):
146133
"""Raised when a requested AWS resource (volume, snapshot, etc.) is not found."""
147134

0 commit comments

Comments
 (0)