diff options
Diffstat (limited to 'python/pkgmanager.cc')
| -rw-r--r-- | python/pkgmanager.cc | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/python/pkgmanager.cc b/python/pkgmanager.cc index 2fda14ee..e8346b3d 100644 --- a/python/pkgmanager.cc +++ b/python/pkgmanager.cc @@ -39,9 +39,10 @@ static PyObject *PkgManagerNew(PyTypeObject *type,PyObject *Args,PyObject *kwds) #ifdef COMPAT_0_7 PyObject *GetPkgManager(PyObject *Self,PyObject *Args) { - PyErr_WarnEx(PyExc_DeprecationWarning, "apt_pkg.GetPackageManager() is " - "deprecated. Please see apt_pkg.PackageManager() for the " - "replacement.", 1); + if (getenv("PYTHON_APT_DEPRECATION_WARNINGS") != NULL) + PyErr_WarnEx(PyExc_DeprecationWarning, "apt_pkg.GetPackageManager() is " + "deprecated. Please see apt_pkg.PackageManager() for the " + "replacement.", 1); return PkgManagerNew(&PyPackageManager_Type,Args,0); } #endif |
