diff options
Diffstat (limited to 'python/acquire.cc')
| -rw-r--r-- | python/acquire.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/python/acquire.cc b/python/acquire.cc index cc9ee310..3f24a3e7 100644 --- a/python/acquire.cc +++ b/python/acquire.cc @@ -372,8 +372,9 @@ PyTypeObject PyAcquire_Type = { #ifdef COMPAT_0_7 PyObject *GetAcquire(PyObject *Self,PyObject *Args) { - PyErr_WarnEx(PyExc_DeprecationWarning,"apt_pkg.GetAcquire() is deprecated." - " Please see apt_pkg.Acquire() for the replacement.", 1); + if (getenv("PYTHON_APT_DEPRECATION_WARNINGS") != NULL) + PyErr_WarnEx(PyExc_DeprecationWarning,"apt_pkg.GetAcquire() is deprecated." + " Please see apt_pkg.Acquire() for the replacement.", 1); return PkgAcquireNew(&PyAcquire_Type,Args,0); } #endif |
