Skip to content

Commit

Permalink
Fix style
Browse files Browse the repository at this point in the history
  • Loading branch information
ChristineTChen committed Jul 28, 2021
1 parent 1c5908b commit 8c1d6a8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion ibm_db2/datadog_checks/ibm_db2/ibm_db2.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ def check(self, instance):
):
try:
query_method()
except ConnectionError as e:
except ConnectionError:
raise
except Exception as e:
self.log.warning('Encountered error running `%s`: %s', query_method.__name__, str(e))
Expand Down
6 changes: 4 additions & 2 deletions ibm_db2/tests/test_unit.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,10 @@ def mock_exception(*args, **kwargs):


def test_query_function_error(aggregator, instance):
exception_msg = '[IBM][CLI Driver][DB2/NT64] SQL0440N No authorized routine named "MON_GET_INSTANCE" of type ' \
'"FUNCTION" having compatible arguments was found. SQLSTATE=42884'
exception_msg = (
'[IBM][CLI Driver][DB2/NT64] SQL0440N No authorized routine named "MON_GET_INSTANCE" of type '
'"FUNCTION" having compatible arguments was found. SQLSTATE=42884'
)

def query_instance(*args, **kwargs):
raise Exception(exception_msg)
Expand Down

0 comments on commit 8c1d6a8

Please sign in to comment.