summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2008-10-22 15:24:50 +0200
committerMichael Vogt <michael.vogt@ubuntu.com>2008-10-22 15:24:50 +0200
commitab1eacf37a1e9125196dca105a59b186fc1783e2 (patch)
treebb47cdbccc3ba8799767c87e2d6a76b2bd547b61
parent3bc4cc400ef9a6994e3ed51526811bfa2acd9927 (diff)
downloadpython-apt-ab1eacf37a1e9125196dca105a59b186fc1783e2.tar.gz
* python/metaindex.cc
- fix crash when incorrect attribute is given
-rw-r--r--debian/changelog2
-rw-r--r--python/metaindex.cc3
2 files changed, 5 insertions, 0 deletions
diff --git a/debian/changelog b/debian/changelog
index 28335af0..87fa1406 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -20,6 +20,8 @@ python-apt (0.7.8) UNRELEASED; urgency=low
- run apt_pkg.init() when aptsources gets imported and not
the distinfo function
- fix detection of cdrom sources and add test for it
+ * python/metaindex.cc
+ - fix crash when incorrect attribute is given
-- Michael Vogt <michael.vogt@ubuntu.com> Wed, 30 Jul 2008 10:24:30 +0200
diff --git a/python/metaindex.cc b/python/metaindex.cc
index c9a86ab4..45c8ef2a 100644
--- a/python/metaindex.cc
+++ b/python/metaindex.cc
@@ -38,6 +38,9 @@ static PyObject *MetaIndexAttr(PyObject *Self,char *Name)
}
return List;
}
+
+ PyErr_SetString(PyExc_AttributeError,Name);
+ return 0;
}
static PyObject *MetaIndexRepr(PyObject *Self)