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
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
handler.py
webssh/handler.py
+4
-2
No files found.
webssh/handler.py
View file @
49226fbf
...
@@ -74,10 +74,12 @@ class IndexHandler(MixinHandler, tornado.web.RequestHandler):
...
@@ -74,10 +74,12 @@ 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
:
if
status_code
==
500
:
self
.
_reason
=
'Internal Server Error'
else
:
exc_info
=
kwargs
.
get
(
'exc_info'
)
exc_info
=
kwargs
.
get
(
'exc_info'
)
if
exc_info
:
if
exc_info
:
self
.
_reason
=
exc_info
[
1
]
.
log_message
self
.
_reason
=
exc_info
[
1
]
.
log_message
...
...
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