summaryrefslogtreecommitdiff
path: root/python/pkgsrcrecords.cc
diff options
context:
space:
mode:
Diffstat (limited to 'python/pkgsrcrecords.cc')
-rw-r--r--python/pkgsrcrecords.cc7
1 files changed, 4 insertions, 3 deletions
diff --git a/python/pkgsrcrecords.cc b/python/pkgsrcrecords.cc
index 95f35f23..729a74b5 100644
--- a/python/pkgsrcrecords.cc
+++ b/python/pkgsrcrecords.cc
@@ -292,9 +292,10 @@ PyTypeObject PySourceRecords_Type =
#ifdef COMPAT_0_7
PyObject *GetPkgSrcRecords(PyObject *Self,PyObject *Args)
{
- PyErr_WarnEx(PyExc_DeprecationWarning, "apt_pkg.GetPkgSrcRecords() is "
- "deprecated. Please see apt_pkg.SourceRecords() for the "
- "replacement.", 1);
+ if (getenv("PYTHON_APT_DEPRECATION_WARNINGS") != NULL)
+ PyErr_WarnEx(PyExc_DeprecationWarning, "apt_pkg.GetPkgSrcRecords() is "
+ "deprecated. Please see apt_pkg.SourceRecords() for the "
+ "replacement.", 1);
if (PyArg_ParseTuple(Args,"") == 0)
return 0;