Fix bug in copy_stream which broke docroot requests with the standalone

server on linux.

* lib/viewcvs.py
  (copy_stream):
    when copying to the sys.stdout, make sure to use the current
    sys.stdout file object instead of the file object cached by
    python as a default argument


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1017 8cb11bc2-c004-0410-86c3-e597b4017df7
remotes/tags/1.0.0-rc1
rey4 2005-02-03 13:05:40 +00:00
parent 33e9c1db0c
commit 72dbcf1fb7
1 changed files with 3 additions and 1 deletions

View File

@ -984,7 +984,9 @@ def retry_read(src, reqlen=CHUNK_SIZE):
continue
return chunk
def copy_stream(src, dst=sys.stdout):
def copy_stream(src, dst=None):
if dst is None:
dst = sys.stdout
while 1:
chunk = retry_read(src)
if not chunk: