From 8dadef713cf0a136bf6730c407166f0569186ce4 Mon Sep 17 00:00:00 2001 From: jalvz Date: Thu, 18 Feb 2016 16:24:34 +0100 Subject: [PATCH] prevent string interpolation with default empty tuple when contains %, fixes issue #94 --- opbeat/instrumentation/packages/dbapi2.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/opbeat/instrumentation/packages/dbapi2.py b/opbeat/instrumentation/packages/dbapi2.py index 11e93259..13811b44 100644 --- a/opbeat/instrumentation/packages/dbapi2.py +++ b/opbeat/instrumentation/packages/dbapi2.py @@ -161,11 +161,11 @@ def extract_signature(sql): class CursorProxy(wrapt.ObjectProxy): provider_name = None - def callproc(self, procname, params=()): + def callproc(self, procname, params=None): return self._trace_sql(self.__wrapped__.callproc, procname, params) - def execute(self, sql, params=()): + def execute(self, sql, params=None): return self._trace_sql(self.__wrapped__.execute, sql, params) def executemany(self, sql, param_list):