diff options
| author | Michael Vogt <michael.vogt@ubuntu.com> | 2006-03-27 15:22:54 +0200 |
|---|---|---|
| committer | Michael Vogt <michael.vogt@ubuntu.com> | 2006-03-27 15:22:54 +0200 |
| commit | 376af57686222fcddc489ca6a6088b6a23ec1ca1 (patch) | |
| tree | d26b939e2ca0892675cff8bd76f8e5097c6cf75b /DistUpgrade/DistUpgradeView.py | |
| parent | 2592b1a3ce1da07de5bd40798be04d60879a8a69 (diff) | |
| download | python-apt-376af57686222fcddc489ca6a6088b6a23ec1ca1.tar.gz | |
* if apt fails, try to recover with "dpkg --configure -a"
Diffstat (limited to 'DistUpgrade/DistUpgradeView.py')
| -rw-r--r-- | DistUpgrade/DistUpgradeView.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/DistUpgrade/DistUpgradeView.py b/DistUpgrade/DistUpgradeView.py index 8e9a3d3f..02894939 100644 --- a/DistUpgrade/DistUpgradeView.py +++ b/DistUpgrade/DistUpgradeView.py @@ -19,6 +19,12 @@ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 # USA +class DumbTerminal(object): + def run(self, cmd): + " expects a command in the subprocess style (as a list) " + subprocess.call(cmd) + + class DistUpgradeView(object): " abstraction for the upgrade view " def __init__(self): @@ -32,6 +38,8 @@ class DistUpgradeView(object): def getInstallProgress(self): " return a install progress object " return apt.progress.InstallProgress() + def getTerminal(self): + return DumbTerminal() def updateStatus(self, msg): """ update the current status of the distUpgrade based on the current view |
