Skip to content

Commit

Permalink
wmiquery - printing exception stack trace only if error is not 'S_FALSE'
Browse files Browse the repository at this point in the history
  • Loading branch information
gabrielg5 committed Nov 28, 2024
1 parent de289b4 commit 15560ab
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions examples/wmiquery.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,10 +101,10 @@ def printReply(self, iEnum):
print('%s |' % record[key]['value'], end=' ')
print()
except Exception as e:
if logging.getLogger().level == logging.DEBUG:
import traceback
traceback.print_exc()
if str(e).find('S_FALSE') < 0:
if logging.getLogger().level == logging.DEBUG:
import traceback
traceback.print_exc()
raise
else:
break
Expand Down

0 comments on commit 15560ab

Please sign in to comment.