<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -309,7 +309,7 @@ class post:
         if name in content_mapping:
             return render.blog_post(content_mapping[name])
         else:
-            raise web.notfound
+            raise web.notfound()
 
 class reblog:
     def GET(self):</diff>
      <filename>blog.py</filename>
    </modified>
    <modified>
      <diff>@@ -194,7 +194,7 @@ class signatories:
     def GET(self, pid):
         user_email = helpers.get_loggedin_email()
         p = get_petition_by_id(pid)
-        if not p: raise web.notfound
+        if not p: raise web.notfound()
         ptitle = p.title
         signs = get_signs(pid).list()
         return render.signature_list(pid, ptitle, signs, is_author(user_email, pid))
@@ -214,7 +214,7 @@ class petition:
         i = web.input()
         pid = pid.rstrip('/')
         p = get_petition_by_id(pid)
-        if not p: raise web.notfound
+        if not p: raise web.notfound()
         
         options = ['unsign', 'edit', 'delete']
         if i.get('m', None) in options:</diff>
      <filename>petition.py</filename>
    </modified>
    <modified>
      <diff>@@ -19,7 +19,7 @@ class userinfo():
         try:
             user = db.select('users', where='id=$uid', vars=locals())[0]
         except IndexError:     
-            raise web.notfound
+            raise web.notfound()
         
         info_form = info_form or forms.userinfo()
         if not password_form:</diff>
      <filename>utils/userinfo.py</filename>
    </modified>
    <modified>
      <diff>@@ -70,7 +70,7 @@ class petitions():
     def GET(self, uid):
         from petition import get_num_signs
         user = db.select('users', what='id, lname, fname', where='id=$uid', vars=locals())      
-        if not user: raise web.notfound
+        if not user: raise web.notfound()
         created, signed = created_by(uid).list(), signed_by(uid).list()
         for p in created + signed: p.signcount = get_num_signs(p.id)
         logged_in = (helpers.get_loggedin_userid() == int(uid))
@@ -82,7 +82,7 @@ class userinfo():
         try:
             user = db.select('users', where='id=$uid', vars=locals())[0]
         except IndexError:     
-            raise web.notfound
+            raise web.notfound()
         
         info_form = info_form or forms.userinfo()
         if not password_form:</diff>
      <filename>utils/users.py</filename>
    </modified>
    <modified>
      <diff>@@ -133,7 +133,7 @@ class find:
                     rep = reps[0]
                     web.seeother('/p/%s' % rep.id)
                 except IndexError:
-                    raise web.notfound
+                    raise web.notfound()
 
         else:
             index = schema.District.select(order='name asc')
@@ -147,7 +147,7 @@ class state:
         try:
             state = schema.State.where(code=state.upper())[0]
         except IndexError:
-            raise web.notfound
+            raise web.notfound()
 
         out = apipublish.publish([state], format)
         if out: return out
@@ -163,7 +163,7 @@ class district:
         try:
             d = schema.District.where(name=district.upper())[0]
         except IndexError:
-            raise web.notfound
+            raise web.notfound()
         
         out = apipublish.publish([d], format)
         if out: return out
@@ -206,7 +206,7 @@ class roll:
             b = schema.Roll.where(id=roll_id)[0]
             votes = schema.Vote.where(roll_id=b.id)
         except IndexError:
-            raise web.notfound
+            raise web.notfound()
 
         out = apipublish.publish([b], format)
         if out: return out
@@ -226,7 +226,7 @@ class bill:
         try:
             b = schema.Bill.where(id=bill_id)[0]
         except IndexError:
-            raise web.notfound
+            raise web.notfound()
         
         out = apipublish.publish([b], format)
         if out: return out
@@ -245,7 +245,7 @@ def earmark_pol_list(pol_id, format, page=0, limit=50):
             order='final_amt desc', vars=locals())
     if not earmarks:
         # @@TODO: something better here. 
-        raise web.notfound
+        raise web.notfound()
     out = apipublish.publish(earmarks, format)
     if out: return out
     return render.earmark_list(earmarks, limit)
@@ -255,7 +255,7 @@ class politician_earmarks:
         try:
             em = schema.Politician.where(id=polid)[0]
         except IndexError:
-            raise web.notfound
+            raise web.notfound()
         return earmark_pol_list(polid, format)
 class earmark:
     def GET(self, earmark_id, format=None):
@@ -268,9 +268,9 @@ class earmark:
         try:
             em = schema.Earmark.where(id=int(earmark_id))[0]
         except IndexError:
-            raise web.notfound
+            raise web.notfound()
         except ValueError:
-            raise web.notfound
+            raise web.notfound()
         return render.earmark(em)
 
 
@@ -289,7 +289,7 @@ class politician:
 
         if idlookup:
             # we were looking up by ID but nothing matched
-            raise web.notfound
+            raise web.notfound()
 
         if polid == &quot;&quot; or polid == &quot;index&quot;:
             p = schema.Politician.select(order='district_id asc')
@@ -302,14 +302,13 @@ class politician:
         try:
             p = schema.Politician.where(id=polid)[0]
         except IndexError:
-            raise web.notfound
+            raise web.notfound()
 
         #@@move into schema
         p.fec_ids = [x.fec_id for x in db.select('politician_fec_ids', what='fec_id',
           where='politician_id=$polid', vars=locals())]
 
         p.related_groups = group_politician_similarity(polid)
-
         out = apipublish.publish([p], format)
         if out: return out
 
@@ -385,7 +384,7 @@ class politician_introduced:
         try:
             pol = schema.Politician.where(id=politician_id)[0]
         except IndexError:
-            raise web.notfound
+            raise web.notfound()
         return render.politician_introduced(pol)
 
 class politician_groups:
@@ -394,7 +393,7 @@ class politician_groups:
         try:
             pol = schema.Politician.where(id=politician_id)[0]
         except IndexError:
-            raise web.notfound
+            raise web.notfound()
         return render.politician_groups(pol, related)
 
 class politician_group:
@@ -417,8 +416,8 @@ class dproperty:
         try:
             table = table_map[table]
         except KeyError:
-            raise web.notfound
-        if not r_safeproperty.match(what): raise web.notfound
+            raise web.notfound()
+        if not r_safeproperty.match(what): raise web.notfound()
 
         #if `what` is not there in the `table` (provide available options rather than 404???)
         try:
@@ -426,7 +425,7 @@ class dproperty:
                                  what='max(%s) as m' % what,
                                  vars=locals())[0].m)
         except:
-            raise web.notfound
+            raise web.notfound()
 
         items = db.select(table,
                           what=&quot;*, 100*(%s/$maxnum) as pct&quot; % what,
@@ -451,7 +450,7 @@ def sparkpos(table, what, id):
         id_col= 'id'
     else: return 0
     assert table in table_map.values()
-    if not r_safeproperty.match(what): raise web.notfound
+    if not r_safeproperty.match(what): raise web.notfound()
     
     item = db.query(&quot;select count(*) as position from %(table)s, \
       (select * from %(table)s where %(id_col)s=$id) as a \
@@ -464,8 +463,8 @@ class sparkdist:
         try:
             table = table_map[table]
         except KeyError:
-            raise web.notfound
-        if not r_safeproperty.match(what): raise web.notfound
+            raise web.notfound()
+        if not r_safeproperty.match(what): raise web.notfound()
 
         inp = web.input(point=None)
         points = db.select(table, what=what, order=what+' asc', where=what+' is not null')
@@ -477,7 +476,7 @@ class sparkdist:
 class staticdata:
     def GET(self, path):
         if not web.config.debug:
-            raise web.notfound
+            raise web.notfound()
 
         assert '..' not in path, 'security'
         return file('data/' + path).read()
@@ -485,7 +484,7 @@ class staticdata:
 app = web.application(urls, globals())
 def notfound():
     web.ctx.status = '404 Not Found'
-    return getattr(render, '404')()
+    return web.notfound(getattr(render, '404')())
 
 def internalerror():
     return web.internalerror(file('templates/500.html').read())</diff>
      <filename>webapp.py</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>e1f3db9f808f24e8c99d47914df63003068327c2</id>
    </parent>
  </parents>
  <author>
    <name>Devi</name>
    <email>asldevi@gmail.com</email>
  </author>
  <url>http://github.com/aaronsw/watchdog/commit/23a346961302494fd6594b4dc44c2bf35361be44</url>
  <id>23a346961302494fd6594b4dc44c2bf35361be44</id>
  <committed-date>2008-12-11T03:33:13-08:00</committed-date>
  <authored-date>2008-12-11T01:51:27-08:00</authored-date>
  <message>fix crasher in notfound</message>
  <tree>df4fc1f923a2e25f4c3f1504764b14d52b797d5a</tree>
  <committer>
    <name>Devi</name>
    <email>asldevi@gmail.com</email>
  </committer>
</commit>
