Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
webssh
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
郑天保
webssh
Commits
49226fbf
Commit
49226fbf
authored
Aug 28, 2018
by
Sheng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Swallow 500 errors
parent
ad12876b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
5 deletions
+7
-5
handler.py
webssh/handler.py
+7
-5
No files found.
webssh/handler.py
View file @
49226fbf
...
@@ -74,13 +74,15 @@ class IndexHandler(MixinHandler, tornado.web.RequestHandler):
...
@@ -74,13 +74,15 @@ class IndexHandler(MixinHandler, tornado.web.RequestHandler):
self
.
result
=
dict
(
id
=
None
,
status
=
None
,
encoding
=
None
)
self
.
result
=
dict
(
id
=
None
,
status
=
None
,
encoding
=
None
)
def
write_error
(
self
,
status_code
,
**
kwargs
):
def
write_error
(
self
,
status_code
,
**
kwargs
):
if
self
.
settings
.
get
(
'serve_traceback'
)
or
status_code
==
500
or
\
if
not
swallow_http_errors
:
not
swallow_http_errors
:
super
(
MixinHandler
,
self
)
.
write_error
(
status_code
,
**
kwargs
)
super
(
MixinHandler
,
self
)
.
write_error
(
status_code
,
**
kwargs
)
else
:
else
:
exc_info
=
kwargs
.
get
(
'exc_info'
)
if
status_code
==
500
:
if
exc_info
:
self
.
_reason
=
'Internal Server Error'
self
.
_reason
=
exc_info
[
1
]
.
log_message
else
:
exc_info
=
kwargs
.
get
(
'exc_info'
)
if
exc_info
:
self
.
_reason
=
exc_info
[
1
]
.
log_message
self
.
result
.
update
(
status
=
self
.
_reason
)
self
.
result
.
update
(
status
=
self
.
_reason
)
self
.
set_status
(
200
)
self
.
set_status
(
200
)
self
.
finish
(
self
.
result
)
self
.
finish
(
self
.
result
)
...
...
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