Re: [viewvc-users] sys.stdout access restricted by mod_wsgi
"C. Michael Pilato" <[email protected]>
| Newsgroups | gmane.comp.version-control.cvs.viewcvs.user |
|---|---|
| Organization | CollabNet, Inc. |
| Message-ID | <[email protected]> |
On 06/12/2011 10:03 AM, Christer Solskogen wrote: > Hi! > > I'm using viewvc with mod_wsgi, and when I use "Diff to previous ..." > I get this error: > > An Exception Has Occurred > > Python Traceback > > Traceback (most recent call last): > File "/usr/local/viewvc/lib/viewvc.py", line 4463, in main > request.run_viewvc() > File "/usr/local/viewvc/lib/viewvc.py", line 394, in run_viewvc > self.view_func(self) > File "/usr/local/viewvc/lib/viewvc.py", line 3240, in view_diff > fp = request.repos.rawdiff(p1, rev1, p2, rev2, diff_type, diff_options) > File "/usr/local/viewvc/lib/vclib/svn/svn_repos.py", line 563, in rawdiff > return vclib._diff_fp(temp1, temp2, info1, info2, self.diff_cmd, args) > File "/usr/local/viewvc/lib/vclib/__init__.py", line 373, in __init__ > self.fp = popen.popen(diff_cmd, args, "r") > File "/usr/local/viewvc/lib/popen.py", line 79, in popen > sys.stdout.flush() > IOError: sys.stdout access restricted by mod_wsgi > > > Is there a workaround for this except not using mod_wsgi? > > (please reply to all, I'm not subscribing on the list) > Technically, well-behaved WSGI applications aren't supposed to use sys.stdout directly -- the WSGI framework is supposed to handle all output. ViewVC is not a well-behaved WSGI application, its WSGI support being really just a bit of a hack to allow that type of deployment at all. Part of that hack involves continuing to spew output to sys.stdout occasionally. Anyway, you might be able to work around this by setting "WSGIRestrictStdout off" in your httpd.conf. -- C. Michael Pilato <[email protected]> CollabNet <> www.collab.net <> Distributed Development On Demand ------------------------------------------------------ http://viewvc.tigris.org/ds/viewMessage.do?dsForumId=4255&dsMessageId=2765440 To unsubscribe from this discussion, e-mail: [[email protected]].
signature.asc
(application/pgp-signature, 198 B)
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) iEYEARECAAYFAk33rpkACgkQokEGqRcG/W5sOQCgxccF5JzCs9gbnFU9wM3eCrIi a6sAn2i32XdjVoWsHbFaObNs9r5EhrfG =iTc7 -----END PGP SIGNATURE-----