From: Holger Levsen Date: Wed, 2 Nov 2011 12:18:44 +0000 (+0100) Subject: this wrong but lets try anyway X-Git-Url: https://git.uhu-banane.de/?a=commitdiff_plain;h=29dba6580e0d5be389cb7a363b562133d1f1fd65;p=profitbricks%2Fjenkins-build-scripts.git this wrong but lets try anyway --- 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(