mishaturnbull / EmailGUI

Stress-test an email server.
https://mishaturnbull.github.io/EmailGUI/index.html
MIT License
0 stars 0 forks source link

Debug mode breaks multithreading #11

Closed mishaturnbull closed 6 years ago

mishaturnbull commented 6 years ago

If debug mode is enabled, each worker thread throws an exception:

Exception in thread Thread-9:
Traceback (most recent call last):
  File "c:\program files (x86)\python36\lib\threading.py", line 916, in _bootstrap_inner
    self.run()
  File "D:/Random Programming Shit/Python/EmailBot/EmailGUI.py", line 669, in run
    self._launch(self['amount'], delay=self['delay'])
  File "D:/Random Programming Shit/Python/EmailBot/EmailGUI.py", line 629, in _launch
    mime.format(num=_ + 1))
KeyError: 'thread'

This is due to the thread not having the necessary string formatting for multithreaded debug messages in the MIME output. Requires a refactoring of the multithreaded MIMEMessage generation.