From 29dba6580e0d5be389cb7a363b562133d1f1fd65 Mon Sep 17 00:00:00 2001 From: Holger Levsen Date: Wed, 2 Nov 2011 13:18:44 +0100 Subject: [PATCH] this wrong but lets try anyway --- kernel_persistence.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kernel_persistence.py b/kernel_persistence.py index 3506b3a..56a0d57 100644 --- a/kernel_persistence.py +++ b/kernel_persistence.py @@ -34,7 +34,7 @@ class KernelVersion(Base): identifier = Column(String(255), unique=True, nullable=False) last_version = Column(Integer, nullable=False) branch_name = Column(String(255), nullable=False) - pb_modules = Column(String(255)) + pb_modules = Column(String(255), nullable=True) def __init__(self, identifier, last_version, branch_name, pb_modules): self.identifier = identifier @@ -63,7 +63,7 @@ def get_last_kernel_revision_obj(branch): try: answ = session.query(KernelVersion).filter( KernelVersion.identifier == persistence_identifier).one() - except NoResultFound: + except: session.add(KernelVersion(persistence_identifier, 0, branch, '')) session.commit() answ = session.query(KernelVersion).filter( -- 2.39.5