[Python-modules-team] Bug#512633: The mod_wsgi.Log object does not have a 'closed' attribute
Arto Jantunen
viiru at debian.org
Thu Jan 22 12:28:50 UTC 2009
Package: libapache2-mod-wsgi
Version: 2.3-1
Severity: minor
Some background: The Hatta wiki engine uses a Mercurial repository as
storage for it's data. It does this by directly importing the needed
parts of Mercurial, not by running the actual hg command. In my case
this lead to trouble when my Mercurial repository was in a funky state
due to completely unrelated reasons.
Mercurial wanted to print an error message to sys.stdout. This would've
been easy to correct with the sys.stdout=sys.stderr-trick, except
Mercurial contains code such as "if not sys.stdout.closed:
sys.stdout.flush()" and the same for stderr. The mod_wsgi.Log object
that replaces sys.stderr doesn't have the closed attribute, so the code
fails and debugging a minor problem with the repo turned into an
interresting project.
It would be nice if an always false closed-attribute could be added to
the Log object for additional compatibility even with code that isn't
originally meant to be used with wsgi.
-- System Information:
Debian Release: 5.0
APT prefers unstable
APT policy: (500, 'unstable')
Architecture: i386 (i686)
Kernel: Linux 2.6.26-1-686 (SMP w/1 CPU core)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Versions of packages libapache2-mod-wsgi depends on:
ii apache2 2.2.11-2 Apache HTTP Server metapackage
ii apache2-mpm-prefork [apache2] 2.2.11-2 Apache HTTP Server - traditional n
ii apache2.2-common 2.2.11-2 Apache HTTP Server common files
ii libc6 2.7-18 GNU C Library: Shared libraries
ii python 2.5.2-3 An interactive high-level object-o
libapache2-mod-wsgi recommends no packages.
Versions of packages libapache2-mod-wsgi suggests:
pn apache2-mpm-worker | apache2- <none> (no description available)
-- no debconf information
More information about the Python-modules-team
mailing list