~ubuntu-core-dev/ubuntu/xenial/ubuntu-release-upgrader/xenial

« back to all changes in this revision

Viewing changes to DistUpgrade/DistUpgradeViewText.py

  • Committer: Michael Vogt
  • Date: 2013-07-24 20:18:57 UTC
  • mto: This revision was merged to the branch mainline in revision 2796.
  • Revision ID: michael.vogt@ubuntu.com-20130724201857-09l4q4cohdf10msv
show progress info during the upgrade in the text mode upgrader

Show diffs side-by-side

added added

removed removed

Lines of Context:
51
51
        return True
52
52
 
53
53
 
 
54
class TextInstallProgress(InstallProgress):
 
55
 
 
56
    def status_change(self, pkg, percent, status):
 
57
        print("[%s] %s" % (percent, status))
 
58
 
 
59
 
54
60
class TextCdromProgressAdapter(apt.progress.base.CdromProgress):
55
61
    """ Report the cdrom add progress  """
56
62
    def update(self, text, step):
88
94
        self._opCacheProgress = apt.progress.text.OpProgress()
89
95
        self._acquireProgress = TextAcquireProgress()
90
96
        self._cdromProgress = TextCdromProgressAdapter()
91
 
        self._installProgress = InstallProgress()
 
97
        self._installProgress = TextInstallProgress()
92
98
        sys.excepthook = self._handleException
93
99
        #self._process_events_tick = 0
94
100