Repository: fedora-infra/bodhi

Issue:
bodhi.server.util.flash_log does not flash
The name and docblock of ```bodhi.server.util.flash_log``` says that it flashes and logs a message, but it only logs the message.


Discussion:

Resolving patch:
diff --git a/bodhi/server/models.py b/bodhi/server/models.py
--- a/bodhi/server/models.py
+++ b/bodhi/server/models.py
@@ -46,7 +46,7 @@
 from bodhi.server.config import config
 from bodhi.server.exceptions import BodhiException, LockedUpdateException
 from bodhi.server.util import (
-    avatar as get_avatar, build_evr, flash_log, get_critpath_components,
+    avatar as get_avatar, build_evr, get_critpath_components,
     get_rpm_header, header, tokenize, pagure_api_get)
 
 if six.PY2:
@@ -2571,11 +2571,11 @@ def set_request(self, db, action, username):
             self.comment(db, u'This update has been unpushed.', author=username)
             notifications.publish(topic=topic, msg=dict(
                 update=self, agent=username))
-            flash_log("%s has been unpushed." % self.title)
+            log.debug("%s has been unpushed." % self.title)
             return
         elif action is UpdateRequest.obsolete:
             self.obsolete(db)
-            flash_log("%s has been obsoleted." % self.title)
+            log.debug("%s has been obsoleted." % self.title)
             notifications.publish(topic=topic, msg=dict(
                 update=self, agent=username))
             return
@@ -2586,7 +2586,7 @@ def set_request(self, db, action, username):
                 and action is UpdateRequest.revoke:
             self.status = UpdateStatus.unpushed
             self.revoke()
-            flash_log("%s has been revoked." % self.title)
+            log.debug("%s has been revoked." % self.title)
             notifications.publish(topic=topic, msg=dict(
                 update=self, agent=username))
             return
@@ -2597,14 +2597,14 @@ def set_request(self, db, action, username):
                 self.status is UpdateStatus.testing and action is UpdateRequest.revoke:
             self.status = UpdateStatus.testing
             self.revoke()
-            flash_log("%s has been revoked." % self.title)
+            log.debug("%s has been revoked." % self.title)
             notifications.publish(topic=topic, msg=dict(
                 update=self, agent=username))
             return
 
         elif action is UpdateRequest.revoke:
             self.revoke()
-            flash_log("%s has been revoked." % self.title)
+            log.debug("%s has been revoked." % self.title)
             notifications.publish(topic=topic, msg=dict(
                 update=self, agent=username))
             return
@@ -2686,7 +2686,7 @@ def set_request(self, db, action, username):
 
         notes = notes and '. '.join(notes) + '.' or ''
         flash_notes = flash_notes and '. %s' % flash_notes
-        flash_log(
+        log.debug(
             "%s has been submitted for %s. %s%s" % (
                 self.title, action.description, notes, flash_notes))
         self.comment(db, u'This update has been submitted for %s by %s. %s' % (
@@ -3023,7 +3023,7 @@ def obsolete_if_unstable(self, db):
                 and self.karma <= self.unstable_karma:
             log.info("%s has reached unstable karma thresholds" % self.title)
             self.obsolete(db)
-            flash_log("%s has been obsoleted." % self.title)
+            log.debug("%s has been obsoleted." % self.title)
         return
 
     def comment(self, session, text, karma=0, author=None, anonymous=False,
diff --git a/bodhi/server/util.py b/bodhi/server/util.py
--- a/bodhi/server/util.py
+++ b/bodhi/server/util.py
@@ -98,16 +98,6 @@ def get_rpm_header(nvr, tries=0):
     raise ValueError("No rpm headers found in koji for %r" % nvr)
 
 
-def flash_log(msg):
-    """
-    Log the given message at debug level.
-
-    Args:
-        msg (basestring): The message to log.
-    """
-    log.debug(msg)
-
-
 def build_evr(build):
     """
     Return a tuple of strings of the given build's epoch, version, and release.


Test patch: