From 4474bb62bda8087f63a9e35edb2f6fcaa1bd96d1 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Thu, 18 Sep 2008 14:48:12 +0200 Subject: add "SelState{Unknown,Install,Hold,DeInstall,Purge}" constant --- python/apt_pkgmodule.cc | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'python') diff --git a/python/apt_pkgmodule.cc b/python/apt_pkgmodule.cc index fd7a83cd..fae85f00 100644 --- a/python/apt_pkgmodule.cc +++ b/python/apt_pkgmodule.cc @@ -517,6 +517,12 @@ extern "C" void initapt_pkg() AddInt(Dict,"CurStateConfigFiles",pkgCache::State::ConfigFiles); AddInt(Dict,"CurStateInstalled",pkgCache::State::Installed); + AddInt(Dict,"SelStateUnknown",pkgCache::State::Unknown); + AddInt(Dict,"SelStateInstall",pkgCache::State::Install); + AddInt(Dict,"SelStateHold",pkgCache::State::Hold); + AddInt(Dict,"SelStateDeInstall",pkgCache::State::DeInstall); + AddInt(Dict,"SelStatePurge",pkgCache::State::Purge); + AddInt(Dict,"InstStateOk",pkgCache::State::Ok); AddInt(Dict,"InstStateReInstReq",pkgCache::State::ReInstReq); AddInt(Dict,"InstStateHold",pkgCache::State::Hold); -- cgit v1.2.3 From ab1eacf37a1e9125196dca105a59b186fc1783e2 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Wed, 22 Oct 2008 15:24:50 +0200 Subject: * python/metaindex.cc - fix crash when incorrect attribute is given --- debian/changelog | 2 ++ python/metaindex.cc | 3 +++ 2 files changed, 5 insertions(+) (limited to 'python') 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 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) -- cgit v1.2.3