~gary-lasker/software-center/fix-crash-lp854187

« back to all changes in this revision

Viewing changes to softwarecenter/ui/gtk3/models/pendingstore.py

  • Committer: Michael Vogt
  • Date: 2011-09-15 16:49:21 UTC
  • Revision ID: michael.vogt@ubuntu.com-20110915164921-ha1v9r4c7zqmviz5
* softwarecenter/backend/installbackend_impl/aptd.py:
  - be more robust about potential races (LP: #848676)
* softwarecenter/ui/gtk3/models/pendingstore.py:
  - only add transactions if we get meaningful data

Show diffs side-by-side

added added

removed removed

Lines of Context:
73
73
            # other clear() is run before the "_append_transaction" handler
74
74
            # is run and we end up with two (or more) _append_transactions
75
75
            trans = self._transactions_watcher.get_transaction(tid)
76
 
            self._append_transaction(trans)
 
76
            if trans:
 
77
                self._append_transaction(trans)
77
78
        # add pending purchases as pseudo transactions
78
79
        for pkgname in self.backend.pending_purchases:
79
80
            iconname = self.backend.pending_purchases[pkgname].iconname