summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2010-02-17 18:18:29 +0100
committerMichael Vogt <michael.vogt@ubuntu.com>2010-02-17 18:18:29 +0100
commitdb9e68fd14345f742211fc293823bff6a2f7d8bd (patch)
treef2b31dc3f66c1c52d27286aa19e123422b0004c4
parent8c2fa71d625189bf848b32e8da9b6e562751dadc (diff)
downloadpython-apt-db9e68fd14345f742211fc293823bff6a2f7d8bd.tar.gz
apt/progress/base.py: more compat fixes
-rw-r--r--apt/progress/base.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/apt/progress/base.py b/apt/progress/base.py
index 88fee206..ac6ea011 100644
--- a/apt/progress/base.py
+++ b/apt/progress/base.py
@@ -28,6 +28,7 @@ import re
import select
import apt_pkg
+from apt.deprecation import function_deprecated_by
__all__ = ['AcquireProgress', 'CdromProgress', 'InstallProgress', 'OpProgress']
@@ -158,6 +159,9 @@ class InstallProgress(object):
def status_change(self, pkg, percent, status):
"""(Abstract) Called when the APT status changed."""
+ # compat with 0.7
+ if apt_pkg._COMPAT_0_7 and hasattr(self, "statusChange"):
+ self.statusChange(pkg, percent, status)
def dpkg_status_change(self, pkg, status):
"""(Abstract) Called when the dpkg status changed."""
@@ -222,7 +226,6 @@ class InstallProgress(object):
(status, pkgname, percent, status_str) = line.split(":", 3)
except ValueError:
# silently ignore lines that can't be parsed
- self.read = ""
return
elif line.startswith('status'):
try:
@@ -281,6 +284,10 @@ class InstallProgress(object):
return res
+ if apt_pkg._COMPAT_0_7:
+ updateInterface = function_deprecated_by(update_interface)
+ waitChild = function_deprecated_by(wait_child)
+
class OpProgress(object):
"""Monitor objects for operations.