Ensure the connection type is always explicitly chosen #2

Open
opened 2025-04-25 19:33:17 +00:00 by codeking · 0 comments
Owner

The current logic (displayed below) silences helpful exceptions and silently imposes an implicit default.

def get_current_connection(self):
    try:
        return ConfigurationController.get_connection()
    except UnknownConnectionTypeError:
        return None
current_connection = self.get_current_connection()
if current_connection is None:
    ConfigurationController.set_connection('system')
The current logic (displayed below) silences helpful exceptions and silently imposes an implicit default. ```py def get_current_connection(self): try: return ConfigurationController.get_connection() except UnknownConnectionTypeError: return None ``` ```py current_connection = self.get_current_connection() if current_connection is None: ConfigurationController.set_connection('system') ```
codeking added this to the Reported Issues project 2025-04-25 19:33:31 +00:00
Sign in to join this conversation.
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: codeking/sp-hydra-veil-gui#2
No description provided.