Package: bittornado
Version: 0.3.18-10
Severity: normal
Tags: patch upstream

in HTTPHandler.py, sys.stdout is imported using "from sys import stdout"

bttrack's logging is done by redirecting sys.stdout, but HTTPHandler is supposed
to handle flushing this stream. The previous bad import idiom means that
HTTPHandler never sees the new sys.stdout, so it never flushes it and logging
messages take forever to actually show up in the log file, or never at all if
bttrack crashes or is terminated.

Patch to fix this is supplied. Also applies to the "bittorrent" package.

Please forward upstream as appropriate.

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

Kernel: Linux 3.2.0-1-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages bittornado depends on:
ii  python          2.7.2-10
ii  python-support  1.0.14

Versions of packages bittornado recommends:
ii  mime-support   3.52-1
ii  python-crypto  2.5-2

Versions of packages bittornado suggests:
pn  bittornado-gui  <none>
pn  python-psyco    <none>

-- no debconf information

-- debsums errors found:
debsums: changed file /usr/share/pyshared/BitTornado/HTTPHandler.py (from 
bittornado package)
--- /usr/share/pyshared/BitTornado/HTTPHandler.py	2012-03-03 13:32:28.231866530 +0000
+++ /usr/share/pyshared/BitTornado/HTTPHandler.py	2012-03-03 13:29:28.343912084 +0000
@@ -2,7 +2,7 @@
 # see LICENSE.txt for license information
 
 from cStringIO import StringIO
-from sys import stdout
+import sys
 import time
 from clock import clock
 from gzip import GzipFile
@@ -164,4 +164,4 @@
         t = clock()
         if t - self.lastflush > self.minflush:
             self.lastflush = t
-            stdout.flush()
+            sys.stdout.flush()

Reply via email to