Package: python3-imaplib2
Version: 2.45.0-1
Followup-For: Bug #796824

Hello!

This bug still persists. Perhaps I should have included steps to reproduce in
my original report, sorry.

Simply connect to any server which refuses IMAP connections:

Python 3.4.3+ (default, Jun  2 2015, 14:09:35)
[GCC 4.9.2] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from imaplib2 import imaplib2
>>> imaplib2.__version__
'2.45'
>>> conn = imaplib2.IMAP4_SSL("slashdot.org")
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python3/dist-packages/imaplib2/imaplib2.py", line 2073, in
__init__
    IMAP4.__init__(self, host, port, debug, debug_file, identifier, timeout,
debug_buf_lvl)
  File "/usr/lib/python3/dist-packages/imaplib2/imaplib2.py", line 345, in
__init__
    self.open(host, port)
  File "/usr/lib/python3/dist-packages/imaplib2/imaplib2.py", line 2085, in
open
    self.sock = self.open_socket()
  File "/usr/lib/python3/dist-packages/imaplib2/imaplib2.py", line 462, in
open_socket
    raise socket.error(msg)
UnboundLocalError: local variable 'msg' referenced before assignment
>>>

The error should instead read "OSError: [Errno 111] Connection refused". This
is only fixed in 2.47 onwards.

Thanks,

Tobias



-- System Information:
Debian Release: stretch/sid
  APT prefers testing
  APT policy: (990, 'testing'), (500, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.1.0-1-amd64 (SMP w/8 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages python3-imaplib2 depends on:
pn  python3:any  <none>

python3-imaplib2 recommends no packages.

python3-imaplib2 suggests no packages.

-- no debconf information

Reply via email to