pyramid/bodhi/bodhi/mail.py | 5 +++++ pyramid/bodhi/bodhi/models/models.py | 6 ++---- 2 files changed, 7 insertions(+), 4 deletions(-)
New commits: commit 3a957482fce7bc7ba67631fb1007b16ddfb9a961 Author: Luke Macken lmacken@redhat.com Date: Thu May 12 00:56:00 2011 -0400
Commit as opposed to flushing in update_bugs to get another unit test passing :)
diff --git a/pyramid/bodhi/bodhi/models/models.py b/pyramid/bodhi/bodhi/models/models.py index 00433ea..feec273 100644 --- a/pyramid/bodhi/bodhi/models/models.py +++ b/pyramid/bodhi/bodhi/models/models.py @@ -646,7 +646,7 @@ class Update(Base): if bz not in self.bugs: Session.add(bz) self.bugs.append(bz) - Session.flush() + Session.commit()
def update_cves(self, cves): """
commit 39595300078a55bd42c2a513e2324a64d4165f03 Author: Luke Macken lmacken@redhat.com Date: Thu May 12 00:55:04 2011 -0400
We don't need/want the ZopeTransactionExtension yet
diff --git a/pyramid/bodhi/bodhi/models/models.py b/pyramid/bodhi/bodhi/models/models.py index 24d590d..00433ea 100644 --- a/pyramid/bodhi/bodhi/models/models.py +++ b/pyramid/bodhi/bodhi/models/models.py @@ -17,8 +17,6 @@ from sqlalchemy.ext.declarative import declarative_base, synonym_for from sqlalchemy.exc import IntegrityError from sqlalchemy.orm.exc import NoResultFound
-from zope.sqlalchemy import ZopeTransactionExtension - from bodhi.util import header, build_evr from bodhi import buildsys, mail from bodhi.models.enum import DeclEnum @@ -37,7 +35,7 @@ class BodhiBase(object):
Base = declarative_base(cls=BodhiBase) metadata = Base.metadata -DBSession = scoped_session(sessionmaker(extension=ZopeTransactionExtension())) +DBSession = scoped_session(sessionmaker())
## ## Enumerated type declarations
commit 3fba9f944e809f811e34f00952de01e3aa670cca Author: Luke Macken lmacken@redhat.com Date: Thu May 12 00:18:53 2011 -0400
Add some TODOs and dumb 'return' statements in our mail module
diff --git a/pyramid/bodhi/bodhi/mail.py b/pyramid/bodhi/bodhi/mail.py index f2c7655..ad64996 100644 --- a/pyramid/bodhi/bodhi/mail.py +++ b/pyramid/bodhi/bodhi/mail.py @@ -411,6 +411,9 @@ def send_mail(sender, to, subject, body):
def send(to, msg_type, update, sender=None): """ Send an update notification email to a given recipient """ + # TODO: port to pyramid mail sender? + return + if not sender: sender = config.get('bodhi_email') if not sender: @@ -430,4 +433,6 @@ def send_releng(subject, body):
def send_admin(msg_type, update, sender=None): """ Send an update notification to the admins/release team. """ + # TODO: port to pyramid mail handler + return send(config.get('release_team_address'), msg_type, update, sender)