If the debug argument is set, then this block is executed:
if __debug __:
if debug:
self._mesg('connected to %s on port %s' % (self.host, self.port))
The variables self.host and self.port are not set yet, then imaplib2
will crash with a getattr() function error:
File "/usr/lib/python3/dist-packages/imaplib2.py", line 340, in __init __
self._mesg('connected to %s on port %s' % (self.host, self.port))
File "/usr/lib/python3/dist-packages/imaplib2.py", line 404, in __getattr __
raise AttributeError("Unknown IMAP4 command: '%s'" % attr)
We can solve this problem changing the self.host to host and self.port
to port, like this:
if __debug __:
if debug:
self._mesg('connected to %s on port %s' % (host, port))
If the debug argument is set, then this block is executed:
The variables
self.host
andself.port
are not set yet, then imaplib2 will crash with a getattr() function error:We can solve this problem changing the
self.host
to host andself.port
to port, like this:Then the problem is solved.
Closes #10