aboutsummaryrefslogtreecommitdiff
path: root/cgi
diff options
context:
space:
mode:
authorLibravatar neptune 2020-08-13 07:30:32 -0400
committerLibravatar neptune 2020-08-13 07:30:32 -0400
commit94b29ae7a8b3b7d93af0089c1357cf575fd7e94d (patch)
treed64a0dac51af13d75b2580ae31ff3551b9824ab7 /cgi
parent2c898d53d906bbc1897f7bde5aa63f9e3a9c6d6f (diff)
downloadweabot-94b29ae7a8b3b7d93af0089c1357cf575fd7e94d.tar.gz
weabot-94b29ae7a8b3b7d93af0089c1357cf575fd7e94d.tar.xz
weabot-94b29ae7a8b3b7d93af0089c1357cf575fd7e94d.zip
Manejada excepción en threadPage cuando un hilo no existe.
Diffstat (limited to 'cgi')
-rw-r--r--cgi/post.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/cgi/post.py b/cgi/post.py
index e27b971..6fc4bac 100644
--- a/cgi/post.py
+++ b/cgi/post.py
@@ -515,9 +515,11 @@ def threadPage(postid, mobile=False, timestamp=0):
else:
template_filename = "board.html"
- threads = [getThread(postid, mobile, timestamp)]
+ thread = getThread(postid, mobile, timestamp)
+ if not thread:
+ raise UserError, "El hilo no existe."
- return renderTemplate(template_filename, {"threads": threads, "replythread": postid}, mobile)
+ return renderTemplate(template_filename, {"threads": [thread], "replythread": postid}, mobile)
def dynamicRead(parentid, ranges, mobile=False):
import re