tylerwince / flake8-bandit

Automated security testing using bandit and flake8.
MIT License
111 stars 23 forks source link

AttributeError on the tempfile #1

Closed tylerwince closed 5 years ago

tylerwince commented 6 years ago

Investigate this:

multiprocessing.pool.RemoteTraceback: 
"""
Traceback (most recent call last):
  File "/usr/local/Cellar/python3/3.6.3/Frameworks/Python.framework/Versions/3.6/lib/python3.6/multiprocessing/pool.py", line 119, in worker
    result = (True, func(*args, **kwds))
  File "/usr/local/lib/python3.6/site-packages/flake8/checker.py", line 648, in _run_checks
    return checker.run_checks()
  File "/usr/local/lib/python3.6/site-packages/flake8/checker.py", line 579, in run_checks
    self.run_ast_checks()
  File "/usr/local/lib/python3.6/site-packages/flake8/checker.py", line 493, in run_ast_checks
    for (line_number, offset, text, check) in runner:
  File "/Users/tyler/repos/flake8-bandit/flake8_bandit.py", line 56, in run
    for error in self._check_source():
  File "/Users/tyler/repos/flake8-bandit/flake8_bandit.py", line 50, in _check_source
    if self.tempfile:
AttributeError: 'BanditTester' object has no attribute 'tempfile'
"""

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/local/bin/flake8", line 11, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.6/site-packages/flake8/main/cli.py", line 16, in main
    app.run(argv)
  File "/usr/local/lib/python3.6/site-packages/flake8/main/application.py", line 396, in run
    self._run(argv)
  File "/usr/local/lib/python3.6/site-packages/flake8/main/application.py", line 384, in _run
    self.run_checks()
  File "/usr/local/lib/python3.6/site-packages/flake8/main/application.py", line 310, in run_checks
    self.file_checker_manager.run()
  File "/usr/local/lib/python3.6/site-packages/flake8/checker.py", line 319, in run
    self.run_parallel()
  File "/usr/local/lib/python3.6/site-packages/flake8/checker.py", line 288, in run_parallel
    for ret in pool_map:
  File "/usr/local/Cellar/python3/3.6.3/Frameworks/Python.framework/Versions/3.6/lib/python3.6/multiprocessing/pool.py", line 735, in next
    raise value
AttributeError: 'BanditTester' object has no attribute 'tempfile'
tylerwince commented 5 years ago

We no longer require a tempfile to be created