summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames E. Blair <corvus@gnu.org>2010-04-03 17:48:34 (GMT)
committerJames E. Blair <corvus@gnu.org>2010-04-03 17:48:34 (GMT)
commit55909aa04365d4cada8143ea4af95cb9626cf7b4 (patch)
treeaa7c581017b21cd78994a029a45134f85f0def71
parent75d10d596e82f1309ff1793f2cda5a47c728e2b4 (diff)
Handle bad arguments to tag method.
-rw-r--r--quoins/controllers.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/quoins/controllers.py b/quoins/controllers.py
index a3a1c5d..888aa55 100644
--- a/quoins/controllers.py
+++ b/quoins/controllers.py
@@ -473,6 +473,10 @@ Comment:
473 473
474 @expose(template="genshi:quoinstemplates.index") 474 @expose(template="genshi:quoinstemplates.index")
475 def tag(self, tagname, start=0): 475 def tag(self, tagname, start=0):
476 try:
477 start=int(start)
478 except:
479 raise tg.exceptions.HTTPNotFound().exception
476 blog = DBSession.query(Blog).get(1) 480 blog = DBSession.query(Blog).get(1)
477 posts = blog.getPostsByTag(tagname) 481 posts = blog.getPostsByTag(tagname)
478 d = post_paginate(start, posts, self.post_paginate) 482 d = post_paginate(start, posts, self.post_paginate)