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

« back to all changes in this revision

Viewing changes to debian/patches/fix-defer-callback.patch

  • 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:
 
1
--- sessioninstaller-0.20+bzr128.orig/sessioninstaller/backends/aptd.py
 
2
+++ sessioninstaller-0.20+bzr128/sessioninstaller/backends/aptd.py
 
3
@@ -44,12 +44,11 @@ class AptDaemonBackend(object):
 
4
     def _run_trans(self, trans, parent, interaction):
 
5
         deferred = defer.Deferred()
 
6
         dia = aptdaemon.gtk3widgets.AptProgressDialog(trans)
 
7
-        dia.connect("finished", lambda x: deferred.callback())
 
8
         if parent:
 
9
             dia.realize()
 
10
             dia.set_transient_for(parent)
 
11
         dia.run(close_on_finished=True, show_error=True,
 
12
-                reply_handler=lambda: True,
 
13
+                reply_handler=deferred.callback,
 
14
                 error_handler=deferred.errback)
 
15
         return deferred
 
16