~ubuntu-core-dev/update-manager/focal

« back to all changes in this revision

Viewing changes to UpdateManager/backend/__init__.py

  • Committer: Brian Murray
  • Date: 2020-04-23 17:47:35 UTC
  • mfrom: (2883.1.1 update-manager)
  • Revision ID: brian@canonical.com-20200423174735-166qicrk3sd858lb
Fix intermittent hang during snap updates (LP: #1874469).

Show diffs side-by-side

added added

removed removed

Lines of Context:
224
224
        # change.get_tasks() can increase between callbacks so we must
225
225
        # avoid jumping backward in progress here
226
226
        if total_fraction > progress_bar.get_fraction():
227
 
            progress_bar.set_fraction(total_fraction)
 
227
            GLib.idle_add(progress_bar.set_fraction, total_fraction)
228
228
 
229
229
    def update_snaps(self):
230
230
        # update status and progress bar