HASecuritySolutions / VulnWhisperer

Create actionable data from your Vulnerability Scans
https://twitter.com/VulnWhisperer
Apache License 2.0
1.36k stars 267 forks source link

Fix closing logging handlers #159

Closed pemontto closed 5 years ago

pemontto commented 5 years ago

Fix closing the logging handlers. The logger variable is locally scoped to the main function, we're trying to close it from within another function.

INFO:vulnWhispererNessus:Scan aggregation complete! Connection to database closed.
ERROR:root:global name 'logger' is not defined
ERROR: global name 'logger' is not defined
Traceback (most recent call last):
  File "/usr/local/bin/vuln_whisperer", line 7, in <module>
    exec(compile(f.read(), __file__, 'exec'))
  File "/tmp/VulnWhisperer-pemontto/bin/vuln_whisperer", line 112, in <module>
    main()
  File "/tmp/VulnWhisperer-pemontto/bin/vuln_whisperer", line 101, in main
    close_logging_handlers()
  File "/tmp/VulnWhisperer-pemontto/bin/vuln_whisperer", line 107, in close_logging_handlers
    for handler in logger.handlers:
NameError: global name 'logger' is not defined