~mvo/software-center/lp1063595

« back to all changes in this revision

Viewing changes to softwarecenter/db/pkginfo_impl/aptcache.py

  • Committer: Gary Lasker
  • Date: 2012-10-05 04:31:08 UTC
  • mfrom: (3212.1.2 fix-size-calc-race)
  • Revision ID: gary.lasker@canonical.com-20121005043108-466to8zj6ebupogp
* lp:~mvo/software-center/fix-size-calc-race:
  - fix crash due to a race in the size calculation code
    in the details view (LP: #1041004)

Show diffs side-by-side

added added

removed removed

Lines of Context:
582
582
 
583
583
    # space calulcation stuff
584
584
    def _on_total_size_calculation_done(self, trans, space):
 
585
        pkgname = trans.packages[0][0]
585
586
        self.emit(
586
 
            "query-total-size-on-install-done", trans.download, trans.space)
 
587
            "query-total-size-on-install-done", 
 
588
            pkgname, trans.download, trans.space)
587
589
 
588
590
    def _on_trans_simulate_error(self, error):
589
591
        LOG.exception("simulate failed")
600
602
                                    addons_install=[], addons_remove=[],
601
603
                                    archive_suite=""):
602
604
        if not pkgname in self._cache:
603
 
            self.emit("query-total-size-on-install-done", 0, 0)
 
605
            self.emit("query-total-size-on-install-done", pkgname, 0, 0)
604
606
 
605
607
        # ensure the syntax is right
606
608
        if archive_suite: