"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "bin/standalone.py" between
viewvc-1.1.27.tar.gz and viewvc-1.1.28.tar.gz

About: ViewVC is a browser interface for CVS and Subversion version control repositories.

standalone.py  (viewvc-1.1.27):standalone.py  (viewvc-1.1.28)
#!/usr/bin/env python #!/usr/bin/env python
# -*-python-*- # -*-python-*-
# #
# Copyright (C) 1999-2019 The ViewCVS Group. All Rights Reserved. # Copyright (C) 1999-2020 The ViewCVS Group. All Rights Reserved.
# #
# By using this file, you agree to the terms and conditions set forth in # By using this file, you agree to the terms and conditions set forth in
# the LICENSE.html file which can be found at the top level of the ViewVC # the LICENSE.html file which can be found at the top level of the ViewVC
# distribution or at http://viewvc.org/license-1.html. # distribution or at http://viewvc.org/license-1.html.
# #
# For more information, visit http://viewvc.org/ # For more information, visit http://viewvc.org/
# #
# ----------------------------------------------------------------------- # -----------------------------------------------------------------------
"""Run "standalone.py -p <port>" to start an HTTP server on a given port """Run "standalone.py -p <port>" to start an HTTP server on a given port
skipping to change at line 317 skipping to change at line 317
# (On windows, reassigning the sys.stdout variable is sufficient # (On windows, reassigning the sys.stdout variable is sufficient
# because pipe_cmds makes it the standard output for child # because pipe_cmds makes it the standard output for child
# processes.) # processes.)
# #
# But we no longer use pipe_cmds. So at the very least, the # But we no longer use pipe_cmds. So at the very least, the
# comment is stale. Is the code okay, though? # comment is stale. Is the code okay, though?
if sys.platform != "win32": if sys.platform != "win32":
save_realstdout = os.dup(1) save_realstdout = os.dup(1)
try: try:
try: try:
sys.argv = []
sys.stdout = self.wfile sys.stdout = self.wfile
if sys.platform != "win32": if sys.platform != "win32":
os.dup2(self.wfile.fileno(), 1) os.dup2(self.wfile.fileno(), 1)
sys.stdin = self.rfile sys.stdin = self.rfile
viewvc.main(StandaloneServer(self), cfg) viewvc.main(StandaloneServer(self), cfg)
finally: finally:
sys.argv = save_argv sys.argv = save_argv
sys.stdin = save_stdin sys.stdin = save_stdin
sys.stdout.flush() sys.stdout.flush()
if sys.platform != "win32": if sys.platform != "win32":
 End of changes. 2 change blocks. 
1 lines changed or deleted 2 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)