Bug 2191 - progress extension and mod_wsgi and hgwebdir raise exception
Summary: progress extension and mod_wsgi and hgwebdir raise exception
Status: RESOLVED FIXED
Alias: None
Product: Mercurial
Classification: Unclassified
Component: Mercurial (show other bugs)
Version: unspecified
Hardware: All All
: normal bug
Assignee: Augie Fackler
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-05-14 02:22 UTC by nikita kozlovsky
Modified: 2010-10-09 11:00 UTC (History)
4 users (show)

See Also:
Python Version: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description nikita kozlovsky 2010-05-14 02:22 UTC
after ca6ba6cac6cd progress extension uses sys.stderr.isatty().

i use mod_wsgi 3.2 from debian sid, python 2.5.4, hg 1.5.3

log from apache:


[Fri May 14 12:18:52 2010] [notice] Apache/2.2.13 (Debian) PHP/5.3.2-1 with
Suhosin-Patch mod_wsgi/3.2 Python/2.5.4 configured -- resuming normal operations
[Fri May 14 12:19:04 2010] [error] [client 127.0.0.1] mod_wsgi (pid=25166):
Exception occurred processing WSGI script '/home/nmk/work/hg_wsgi.py'.
[Fri May 14 12:19:04 2010] [error] [client 127.0.0.1] Traceback (most recent
call last):
[Fri May 14 12:19:04 2010] [error] [client 127.0.0.1]   File
"/usr/lib/python2.5/site-packages/mercurial/hgweb/hgwebdir_mod.py", line
103, in __call__
[Fri May 14 12:19:04 2010] [error] [client 127.0.0.1]     return
self.run_wsgi(req)
[Fri May 14 12:19:04 2010] [error] [client 127.0.0.1]   File
"/usr/lib/python2.5/site-packages/mercurial/hgweb/hgwebdir_mod.py", line
159, in run_wsgi
[Fri May 14 12:19:04 2010] [error] [client 127.0.0.1]     repo =
hg.repository(self.ui, real)
[Fri May 14 12:19:04 2010] [error] [client 127.0.0.1]   File
"/usr/lib/python2.5/site-packages/mercurial/hg.py", line 82, in repository
[Fri May 14 12:19:04 2010] [error] [client 127.0.0.1]     repo =
_lookup(path).instance(ui, path, create)
[Fri May 14 12:19:04 2010] [error] [client 127.0.0.1]   File
"/usr/lib/python2.5/site-packages/mercurial/localrepo.py", line 2221, in
instance
[Fri May 14 12:19:04 2010] [error] [client 127.0.0.1]     return
localrepository(ui, util.drop_scheme('file', path), create)
[Fri May 14 12:19:04 2010] [error] [client 127.0.0.1]   File
"/usr/lib/python2.5/site-packages/mercurial/localrepo.py", line 37, in __init__
[Fri May 14 12:19:04 2010] [error] [client 127.0.0.1]    
extensions.loadall(self.ui)
[Fri May 14 12:19:04 2010] [error] [client 127.0.0.1]   File
"/usr/lib/python2.5/site-packages/mercurial/extensions.py", line 94, in loadall
[Fri May 14 12:19:04 2010] [error] [client 127.0.0.1]     uisetup(ui)
[Fri May 14 12:19:04 2010] [error] [client 127.0.0.1]   File
"/usr/lib/python2.5/site-packages/hgext/progress.py", line 180, in uisetup
[Fri May 14 12:19:04 2010] [error] [client 127.0.0.1]     if
((sys.stderr.isatty() or ui.configbool('progress', 'assume-tty'))
[Fri May 14 12:19:04 2010] [error] [client 127.0.0.1] AttributeError:
'mod_wsgi.Log' object has no attribute 'isatty'
Comment 1 Augie Fackler 2010-10-09 08:56 UTC
Just patchbombed a fix for this.
Comment 2 HG Bot 2010-10-09 11:00 UTC
Fixed by http://hg.intevation.org/mercurial/crew/rev/646eb9337c87
Augie Fackler <durin42@gmail.com>
progress: make sure stderr has isatty before calling (issue2191)
Comment 3 Bugzilla 2012-05-12 09:09 UTC

--- Bug imported by bugzilla@serpentine.com 2012-05-12 09:09 EDT  ---

This bug was previously known as _bug_ 2191 at http://mercurial.selenic.com/bts/issue2191