Package: ipcheck Version: 0.233-1 Severity: normal Tags: patch Everytime I run ipcheck.py on cron (I have it in /etc/cron.hourly), I get this:
Traceback (most recent call last): File "/usr/sbin/ipcheck.py", line 5518, in <module> _main(sys.argv) File "/usr/sbin/ipcheck.py", line 5198, in _main fp.close() File "/usr/lib/python2.6/socket.py", line 273, in close self._sock.close() AttributeError: 'NoneType' object has no attribute 'close' I have attached the patch I used to silence these errors. Cheers, Francois -- System Information: Debian Release: squeeze/sid APT prefers unstable APT policy: (500, 'unstable'), (1, 'experimental') Architecture: amd64 (x86_64) Kernel: Linux 2.6.33.5-grsec (SMP w/2 CPU cores) Locale: LANG=fr_CA.UTF-8, LC_CTYPE=fr_CA.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Versions of packages ipcheck depends on: ii python 2.6.5-5 An interactive high-level object-o ipcheck recommends no packages. ipcheck suggests no packages. -- no debconf information -- debsums errors found: debsums: changed file /usr/sbin/ipcheck (from ipcheck package)
--- /usr/sbin/ipcheck.py 2006-02-23 06:51:51.000000000 +1300 +++ ipcheck.py 2010-07-01 09:24:47.000000000 +1200 @@ -5187,15 +5187,15 @@ logger.logit(logline) # try to get the html text + fp = None try: fp = h2.getfile() httpdata = fp.read() - fp.close() except: httpdata = "No output from http request." - # explicitly close - fp.close() + if fp: + fp.close() logline = "fd closed" logger.logit(logline)