]> Frank Brehm's Git Trees - profitbricks/jenkins-build-scripts.git/commitdiff
this wrong but lets try anyway
authorHolger Levsen <holger@layer-acht.org>
Wed, 2 Nov 2011 12:18:44 +0000 (13:18 +0100)
committerHolger Levsen <holger@layer-acht.org>
Wed, 2 Nov 2011 12:18:44 +0000 (13:18 +0100)
kernel_persistence.py

index 3506b3a9a6281e631506a75eaa763365dc4297e3..56a0d575459619dddfd9347b0ba91222c2a20f5a 100644 (file)
@@ -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(