Skip to content

fix: replace broad Exception and print() with proper error handling in faces.py #1222

@ajithhraj

Description

@ajithhraj

db_update_face_cluster_ids_batch in faces.py has two problems:

  • Uses broad except Exception instead of sqlite3.Error
  • Uses print("Error updating face cluster IDs in batch.") instead of proper logging

Proposed fix

  • Replace except Exception with except sqlite3.Error
  • Replace print() with logger.error()
  • Add import logging and logger = logging.getLogger(__name__)

I'd like to fix this if maintainers agree.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions