update_feeds: On exit, indicate that everything is done.
authorNeal H. Walfield <neal@walfield.org>
Sun, 27 Nov 2011 19:35:35 +0000 (20:35 +0100)
committerNeal H. Walfield <neal@walfield.org>
Sun, 27 Nov 2011 19:35:35 +0000 (20:35 +0100)
src/update_feeds.py

index 4a7ffad..b7e2040 100644 (file)
@@ -44,6 +44,8 @@ logger = logging.getLogger(__name__)
 import debugging
 debugging.init(dot_directory=".feedingit", program_name="update_feeds")
 
+from updatedbus import update_server_object
+
 CONFIGDIR="/home/user/.feedingit/"
 #DESKTOP_FILE = "/usr/share/applications/hildon-status-menu/feedingit_status.desktop"
 
@@ -169,6 +171,14 @@ class FeedUpdate(UpdateServerObject):
 
         if not self.am_updating:
             logger.info("Nothing to do for a while.  Quitting.")
+
+            # Make any progress bar go away.
+            try:
+                update_server_object().UpdateProgress(
+                    100, 0, 0, 0, 0, 0, 0, "")
+            except Exception:
+                logger.exception("Sending final progress update")
+
             mainloop.quit()
 
     def StopUpdate(self):