]> Frank Brehm's Git Trees - profitbricks/jenkins-build-scripts.git/commitdiff
fix persistence
authorHolger Levsen <holger@layer-acht.org>
Wed, 2 Nov 2011 11:32:32 +0000 (12:32 +0100)
committerHolger Levsen <holger@layer-acht.org>
Wed, 2 Nov 2011 11:32:32 +0000 (12:32 +0100)
kernel_persistence.py

index 4810f6563553ace48c094c32e0e03ff008ec1957..7165676b5a70b7375a3297c6cb1c55aa00898ebe 100644 (file)
@@ -43,8 +43,8 @@ class KernelVersion(Base):
         self.pb_modules = pb_modules
 
     def __repr__(self):
-        return '<KernelVersion(identifier=\'%s\', last_version=\'%s\')>' %(
-                self.identifier, self.last_version
+        return '<KernelVersion(identifier=\'%s\', last_version=\'%s\'), branch_name=\'%s\', pb_modules=\'%s\'>' %(
+                self.identifier, self.last_version, self.branch_name, self.pb_modules
         )
 
 def get_last_kernel_revision_obj(branch):
@@ -62,7 +62,7 @@ def get_last_kernel_revision_obj(branch):
         answ = session.query(KernelVersion).filter(
                 KernelVersion.identifier == persistence_identifier).one()
     except NoResultFound:
-        session.add(KernelVersion(persistence_identifier, 0))
+        session.add(KernelVersion(persistence_identifier, 0, branch, ''))
         session.commit()
         answ = session.query(KernelVersion).filter(
                 KernelVersion.identifier == persistence_identifier).one()