Skip to content

empty-catch: sdks/python/pmxt/server_manager.py:156 — except Exception: pass silently ignores version-check failure #814

@realfishsam

Description

@realfishsam

Violation

except Exception:
    pass

Location

sdks/python/pmxt/server_manager.py:156 (inside version-mismatch detection logic)

Why It Matters

This except Exception: pass wraps the entire version comparison block. If parsing or comparing version strings raises (e.g. malformed server response, unexpected schema), the function silently returns False, meaning the server is never flagged as needing a restart due to version mismatch. Users end up talking to a stale server with no indication anything went wrong.

Suggested Fix

Log the exception at warn level before falling through to return False:

except Exception as e:
    logger.warning("server_manager: version check failed: %s", e)

Found by automated code hygiene audit

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions