~ubuntu-branches/ubuntu/wily/sessioninstaller/wily-proposed

« back to all changes in this revision

Viewing changes to sessioninstaller/backends/aptd.py

  • Committer: Package Import Robot
  • Author(s): Michael Terry
  • Date: 2012-07-23 16:18:37 UTC
  • Revision ID: package-import@ubuntu.com-20120723161837-qhv0njnm8bg53fg0
Tags: 0.20+bzr128-0ubuntu1.1
* debian/patches/fix-defer-callback.patch:
  - Make sure not to accidentally call defer.callback() twice
    (LP: #848605)

Show diffs side-by-side

added added

removed removed

Lines of Context:
44
44
    def _run_trans(self, trans, parent, interaction):
45
45
        deferred = defer.Deferred()
46
46
        dia = aptdaemon.gtk3widgets.AptProgressDialog(trans)
47
 
        dia.connect("finished", lambda x: deferred.callback())
48
47
        if parent:
49
48
            dia.realize()
50
49
            dia.set_transient_for(parent)
51
50
        dia.run(close_on_finished=True, show_error=True,
52
 
                reply_handler=lambda: True,
 
51
                reply_handler=deferred.callback,
53
52
                error_handler=deferred.errback)
54
53
        return deferred
55
54