This is an automated email from the ASF dual-hosted git repository.

yihaochen pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/skywalking-python.git


The following commit(s) were added to refs/heads/master by this push:
     new 72903ff  Fix psycopg2 register_type() second arg default (#212)
72903ff is described below

commit 72903ff3c3c78b9e5046f47c655e560fb328dd34
Author: Tomasz Pytel <[email protected]>
AuthorDate: Wed Jun 8 11:51:35 2022 -0300

    Fix psycopg2 register_type() second arg default (#212)
    
    * fix psycopg2 register_type() second arg default
---
 skywalking/plugins/sw_psycopg2.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/skywalking/plugins/sw_psycopg2.py 
b/skywalking/plugins/sw_psycopg2.py
index 7d7c80c..b0f9aaf 100644
--- a/skywalking/plugins/sw_psycopg2.py
+++ b/skywalking/plugins/sw_psycopg2.py
@@ -132,7 +132,7 @@ def install():
     try:  # try to instrument register_type which will fail if it gets a 
wrapped cursor or connection
         from psycopg2._psycopg import register_type as _register_type
 
-        def register_type(c, conn_or_curs):
+        def register_type(c, conn_or_curs=None):
             if isinstance(conn_or_curs, ProxyConnection):
                 conn_or_curs = conn_or_curs._self_conn
             elif isinstance(conn_or_curs, ProxyCursor):

Reply via email to