Package: python-dictclient
Version: 1.0.3.2
Severity: normal
Tags: upstream


dictclient sometimes (when dictd does not return 200 status) throws a NameError 
exception:

  File "/usr/lib/python2.7/dist-packages/dictclient.py", line 50, in __init__
    self.saveconnectioninfo()
  File "/usr/lib/python2.7/dist-packages/dictclient.py", line 107, in 
saveconnectioninfo
    code, string = self.get200result()
  File "/usr/lib/python2.7/dist-packages/dictclient.py", line 67, in 
get200result
    line
NameError: global name 'line' is not defined


the code at that line says:

    def get200result(self):
        """Used when expecting a single line of text -- a 200-class
        result.  Returns [intcode, remaindertext]"""

        code, text = self.getresultcode()
        if code < 200 or code >= 300:
            raise Exception, "Got '%s' when 200-class response expected" % \
                  line
        return [code, text]

Obviously, "line" should be replaced by "code".


-- System Information:
Debian Release: 10.3
  APT prefers stable
  APT policy: (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 5.2.8milan3 (SMP w/6 CPU cores)
Kernel taint flags: TAINT_UNSIGNED_MODULE
Locale: LANG=C.UTF-8, LC_CTYPE=C.UTF-8 (charmap=UTF-8), LANGUAGE=C.UTF-8 
(charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages python-dictclient depends on:
ii  python  2.7.16-1

python-dictclient recommends no packages.

Versions of packages python-dictclient suggests:
ii  dictd  1.12.1+dfsg-8

-- no debconf information

Reply via email to