aboutsummaryrefslogtreecommitdiffstats
path: root/server.py
diff options
context:
space:
mode:
authorJames Taylor <user234683@users.noreply.github.com>2018-12-21 01:59:33 -0800
committerJames Taylor <user234683@users.noreply.github.com>2018-12-21 01:59:33 -0800
commitdca25bd4cc52fd7555f4210f3fa7fa73bf920d97 (patch)
tree846caafc095ac60d034d309e745c608945ab8aae /server.py
parente499ff6185b8f7a87de3dd4fd81f34f70fd2f9c0 (diff)
downloadyt-local-dca25bd4cc52fd7555f4210f3fa7fa73bf920d97.tar.lz
yt-local-dca25bd4cc52fd7555f4210f3fa7fa73bf920d97.tar.xz
yt-local-dca25bd4cc52fd7555f4210f3fa7fa73bf920d97.zip
Properly handle terminated channel on channel's playlist and about page
Diffstat (limited to 'server.py')
-rw-r--r--server.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/server.py b/server.py
index 34f465f..647accf 100644
--- a/server.py
+++ b/server.py
@@ -115,6 +115,10 @@ def site_dispatch(env, start_response):
yield error_code('404 Not Found', start_response)
return
+ except http_errors.Code200 as e: # Raised in scenarios where a simple status message is to be returned, such as a terminated channel
+ start_response('200 OK', ())
+ yield str(e).encode('utf-8')
+
except http_errors.Error404 as e:
start_response('404 Not Found', ())
yield str(e).encode('utf-8')