Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
e718c37d
Commit
e718c37d
authored
8 years ago
by
Stefan Krah
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue #27241: Catch exception when running pstats as main.
parent
05850ce9
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletion
+4
-1
Lib/pstats.py
Lib/pstats.py
+4
-1
No files found.
Lib/pstats.py
View file @
e718c37d
...
@@ -574,7 +574,10 @@ if __name__ == '__main__':
...
@@ -574,7 +574,10 @@ if __name__ == '__main__':
def
do_add
(
self
,
line
):
def
do_add
(
self
,
line
):
if
self
.
stats
:
if
self
.
stats
:
try
:
self
.
stats
.
add
(
line
)
self
.
stats
.
add
(
line
)
except
IOError
as
e
:
print
(
"Failed to load statistics for %s: %s"
%
(
line
,
e
),
file
=
self
.
stream
)
else
:
else
:
print
(
"No statistics object is loaded."
,
file
=
self
.
stream
)
print
(
"No statistics object is loaded."
,
file
=
self
.
stream
)
return
0
return
0
...
...
This diff is collapsed.
Click to expand it.
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