"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "lib/debug.py" between
viewvc-1.1.26.tar.gz and viewvc-1.1.27.tar.gz

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

debug.py  (viewvc-1.1.26):debug.py  (viewvc-1.1.27)
# -*-python-*- # -*-python-*-
# #
# Copyright (C) 1999-2017 The ViewCVS Group. All Rights Reserved. # Copyright (C) 1999-2019 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/
# #
# ----------------------------------------------------------------------- # -----------------------------------------------------------------------
# #
skipping to change at line 109 skipping to change at line 109
'stacktrace' : None, 'stacktrace' : None,
} }
try: try:
import traceback, string import traceback, string
if isinstance(exc, ViewVCException): if isinstance(exc, ViewVCException):
exc_dict['msg'] = exc.msg exc_dict['msg'] = exc.msg
exc_dict['status'] = exc.status exc_dict['status'] = exc.status
tb = string.join(traceback.format_exception(exc_type, exc, exc_tb), '') # Build a string from the formatted exception, but skipping the
exc_dict['stacktrace'] = tb # first line.
formatted = traceback.format_exception(exc_type, exc, exc_tb)
if exc_tb is not None:
formatted = formatted[1:]
exc_dict['stacktrace'] = string.join(formatted, '')
finally: finally:
# prevent circular reference. sys.exc_info documentation warns # prevent circular reference. sys.exc_info documentation warns
# "Assigning the traceback return value to a local variable in a function # "Assigning the traceback return value to a local variable in a function
# that is handling an exception will cause a circular reference..." # that is handling an exception will cause a circular reference..."
# This is all based on 'exc_tb', and we're now done with it. Toss it. # This is all based on 'exc_tb', and we're now done with it. Toss it.
del exc_tb del exc_tb
return exc_dict return exc_dict
 End of changes. 2 change blocks. 
3 lines changed or deleted 7 lines changed or added

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