diff options
Diffstat (limited to 'python/pkgrecords.cc')
| -rw-r--r-- | python/pkgrecords.cc | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/python/pkgrecords.cc b/python/pkgrecords.cc index 0e00edcd..916a2e0f 100644 --- a/python/pkgrecords.cc +++ b/python/pkgrecords.cc @@ -195,9 +195,10 @@ PyTypeObject PyPackageRecords_Type = #ifdef COMPAT_0_7 PyObject *GetPkgRecords(PyObject *Self,PyObject *Args) { - PyErr_WarnEx(PyExc_DeprecationWarning, "apt_pkg.GetPkgRecords() is " - "deprecated. Please see apt_pkg.Records() for the " - "replacement.", 1); + if (getenv("PYTHON_APT_DEPRECATION_WARNINGS") != NULL) + PyErr_WarnEx(PyExc_DeprecationWarning, "apt_pkg.GetPkgRecords() is " + "deprecated. Please see apt_pkg.Records() for the " + "replacement.", 1); return PkgRecordsNew(&PyPackageRecords_Type,Args,0); } #endif |
