diff options
| author | Michael Vogt <michael.vogt@ubuntu.com> | 2010-06-01 17:14:30 +0200 |
|---|---|---|
| committer | Michael Vogt <michael.vogt@ubuntu.com> | 2010-06-01 17:14:30 +0200 |
| commit | 015acac98dc88fbbca5672c6be678c8dea491a8e (patch) | |
| tree | ea4c6b4a385aa25d96746886589f2928e58891af /apt/progress/old.py | |
| parent | e74ead9f918b38bfe8ae5cfe941df4057dcc509e (diff) | |
| download | python-apt-015acac98dc88fbbca5672c6be678c8dea491a8e.tar.gz | |
revert commit 346 (this re-enable the deprecation warnings)
Diffstat (limited to 'apt/progress/old.py')
| -rw-r--r-- | apt/progress/old.py | 25 |
1 files changed, 10 insertions, 15 deletions
diff --git a/apt/progress/old.py b/apt/progress/old.py index 2d3fdb59..4bd79f2e 100644 --- a/apt/progress/old.py +++ b/apt/progress/old.py @@ -42,9 +42,8 @@ class OpProgress(base.OpProgress): def __init__(self): base.OpProgress.__init__(self) - if "PYTHON_APT_DEPRECATION_WARNINGS" in os.environ: - warnings.warn("apt.progress.OpProgress is deprecated.", - DeprecationWarning, stacklevel=2) + warnings.warn("apt.progress.OpProgress is deprecated.", + DeprecationWarning, stacklevel=2) subOp = AttributeDeprecatedBy('subop') Op = AttributeDeprecatedBy('op') @@ -55,9 +54,8 @@ class OpTextProgress(OpProgress, text.OpProgress): def __init__(self): text.OpProgress.__init__(self) - if "PYTHON_APT_DEPRECATION_WARNINGS" in os.environ: - warnings.warn("apt.progress.OpTextProgress is deprecated.", - DeprecationWarning, stacklevel=2) + warnings.warn("apt.progress.OpTextProgress is deprecated.", + DeprecationWarning, stacklevel=2) class FetchProgress(object): @@ -77,9 +75,8 @@ class FetchProgress(object): self.totalBytes = 0 self.totalItems = 0 self.currentCPS = 0 - if "PYTHON_APT_DEPRECATION_WARNINGS" in os.environ: - warnings.warn("apt.progress.FetchProgress is deprecated.", - DeprecationWarning, stacklevel=2) + warnings.warn("apt.progress.FetchProgress is deprecated.", + DeprecationWarning, stacklevel=2) def start(self): """Called when the fetching starts.""" @@ -178,9 +175,8 @@ class CdromProgress(object): """Report the cdrom add progress.""" def __init__(self): - if "PYTHON_APT_DEPRECATION_WARNINGS" in os.environ: - warnings.warn("apt.progress.CdromProgress is deprecated.", - DeprecationWarning, stacklevel=2) + warnings.warn("apt.progress.CdromProgress is deprecated.", + DeprecationWarning, stacklevel=2) def askCdromName(self): """Ask for a cdrom name""" @@ -197,9 +193,8 @@ class DumbInstallProgress(base.InstallProgress): def __init__(self): base.InstallProgress.__init__(self) - if "PYTHON_APT_DEPRECATION_WARNINGS" in os.environ: - warnings.warn("apt.progress.*InstallProgress are deprecated.", - DeprecationWarning, stacklevel=2) + warnings.warn("apt.progress.*InstallProgress are deprecated.", + DeprecationWarning, stacklevel=2) def updateInterface(self): # *_stream were not available in the old progress reporting classes, |
