Skip to content

Commit

Permalink
Fix #76 - psycopg2 cursors not working when using Dict cursors
Browse files Browse the repository at this point in the history
  • Loading branch information
dlopes7 committed Jun 22, 2023
1 parent 7c90d89 commit 49091a0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion autodynatrace/wrappers/psycopg2/wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ def instrument():
def parse_dsn(dsn):
return {c.split("=")[0]: c.split("=")[1] for c in dsn.split() if "=" in c}

class DynatraceCursor(psycopg2.extensions.cursor):
class DynatraceCursor(psycopg2.extra.DictCursorBase):
def __init__(self, *args, **kwargs):
self._dynatrace_db_info = kwargs.pop("dynatrace_db_info", None)
super(DynatraceCursor, self).__init__(*args, **kwargs)
Expand Down

0 comments on commit 49091a0

Please sign in to comment.