Skip to content

Commit adcdccd

Browse files
author
Yann MAHE
committed
[wmi] additional fixes
pending
1 parent 2cf27c9 commit adcdccd

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

checks/libs/wmi/exceptions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ def set_exception(exception):
1717
return set_exception
1818

1919

20-
def raise_on_com_error(error, silent=True):
20+
def raise_on_com_error(error):
2121
"""
2222
Raise the user exception associated with the given `com_error` or
2323
fall back to the original exception.

checks/libs/wmi/sampler.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -462,11 +462,10 @@ def _query(self): # pylint: disable=E0202
462462

463463
try:
464464
raw_results = self.get_connection().ExecQuery(wql, "WQL", query_flags)
465+
results = self._parse_results(raw_results, includes_qualifiers=includes_qualifiers)
465466
except pywintypes.com_error as e:
466467
self._handle_com_error(e, wql)
467468
results = []
468-
else:
469-
results = self._parse_results(raw_results, includes_qualifiers=includes_qualifiers)
470469

471470
return results
472471

0 commit comments

Comments
 (0)