Skip to content

Open pgcursor in own try-except #13

@ElDeveloper

Description

@ElDeveloper

Ported from Qiita-pet.

squirrelo commented 23 days ago
if try-except fails on pgcursor creation, the pgcursor.close() will also fail. This needs to be broken out into its own try-except.

wasade commented 22 days ago
Agree. This behavior should be centralized though a common general mechanism otherwise the code will be full of difficult to read replication with try/excepts. This has a further benefit in that it tightens and isolates where database interaction is actually performed.

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