b07b61023bea — Nolan Prescott 4 years ago
Better exception handling practice

remove unnecessary parens
1 files changed, 3 insertions(+), 3 deletions(-)

M glue_boy.py
M glue_boy.py +3 -3
@@ 13,7 13,7 @@ from twisted.internet.defer import ensur
 from twisted.web.static import File
 
 
-class GluesDatabase():
+class GluesDatabase:
     db_pool = adbapi.ConnectionPool('sqlite3', 'glues.sqlite',
                                     check_same_thread=False)
     table = 'glues'

          
@@ 30,7 30,7 @@ class GluesDatabase():
                                               "WHERE id = ?", (paste_id,))
         try:
             return content[0][0]
-        except:
+        except Exception:
             raise NotFound()
 
     async def write_paste(self, content):

          
@@ 47,7 47,7 @@ class NotFound(Exception):
     pass
 
 
-class WebApp():
+class WebApp:
     app = Klein()
     db = GluesDatabase()