diff options
author | Jon Bergli Heier <snakebite@jvnv.net> | 2011-11-05 10:13:34 +0100 |
---|---|---|
committer | Jon Bergli Heier <snakebite@jvnv.net> | 2011-11-05 10:14:08 +0100 |
commit | 3cde6000b7b5ceffc0dd9a8a0f053f7652bebeeb (patch) | |
tree | dcd1afae0c4e38b9667579a62fda9d9599ca4aed /db.py | |
parent | a50c52ed2c6b82639b4dbbb50c2d2633bb3699e9 (diff) |
Catch exceptions on non-existent pastes and return an empty 404 page.
Diffstat (limited to 'db.py')
-rw-r--r-- | db.py | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -1,6 +1,7 @@ from sqlalchemy import create_engine, Column, Integer, String, DateTime, Text, Index, ForeignKey from sqlalchemy.ext.declarative import declarative_base from sqlalchemy.orm import sessionmaker, relation, backref +from sqlalchemy.orm.exc import NoResultFound import settings engine = create_engine(settings.db_path) |