Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
ZEO
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
ZEO
Commits
f0c5ab98
Commit
f0c5ab98
authored
Oct 22, 2001
by
Jeremy Hylton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add some whitespace
parent
c2a6316c
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
8 deletions
+9
-8
src/zLOG/FormatException.py
src/zLOG/FormatException.py
+9
-8
No files found.
src/zLOG/FormatException.py
View file @
f0c5ab98
...
@@ -82,20 +82,21 @@
...
@@ -82,20 +82,21 @@
# attributions are listed in the accompanying credits file.
# attributions are listed in the accompanying credits file.
#
#
##############################################################################
##############################################################################
__version__
=
'$Revision: 1.
1
$'
[
11
:
-
2
]
__version__
=
'$Revision: 1.
2
$'
[
11
:
-
2
]
import
string
,
sys
import
string
,
sys
format_exception_only
=
None
format_exception_only
=
None
def
format_exception
(
etype
,
value
,
tb
,
limit
=
None
,
delimiter
=
'
\
n
'
,
def
format_exception
(
etype
,
value
,
tb
,
limit
=
None
,
delimiter
=
'
\
n
'
,
header
=
''
,
trailer
=
''
):
header
=
''
,
trailer
=
''
):
global
format_exception_only
global
format_exception_only
if
format_exception_only
is
None
:
if
format_exception_only
is
None
:
import
traceback
import
traceback
format_exception_only
=
traceback
.
format_exception_only
format_exception_only
=
traceback
.
format_exception_only
result
=
[
'Traceback (innermost last):'
]
result
=
[
'Traceback (innermost last):'
]
if
header
:
result
.
insert
(
0
,
header
)
if
header
:
result
.
insert
(
0
,
header
)
if
limit
is
None
:
if
limit
is
None
:
if
hasattr
(
sys
,
'tracebacklimit'
):
if
hasattr
(
sys
,
'tracebacklimit'
):
limit
=
sys
.
tracebacklimit
limit
=
sys
.
tracebacklimit
...
@@ -106,9 +107,9 @@ def format_exception(etype,value,tb,limit=None, delimiter='\n',
...
@@ -106,9 +107,9 @@ def format_exception(etype,value,tb,limit=None, delimiter='\n',
co
=
f
.
f_code
co
=
f
.
f_code
filename
=
co
.
co_filename
filename
=
co
.
co_filename
name
=
co
.
co_name
name
=
co
.
co_name
locals
=
f
.
f_locals
locals
=
f
.
f_locals
result
.
append
(
' File %s, line %d, in %s'
result
.
append
(
' File %s, line %d, in %s'
%
(
filename
,
lineno
,
name
))
%
(
filename
,
lineno
,
name
))
try
:
result
.
append
(
' (Object: %s)'
%
try
:
result
.
append
(
' (Object: %s)'
%
locals
[
co
.
co_varnames
[
0
]].
__name__
)
locals
[
co
.
co_varnames
[
0
]].
__name__
)
except
:
pass
except
:
pass
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment