diff options
| author | Michael Vogt <michael.vogt@ubuntu.com> | 2008-11-03 11:47:49 +0100 |
|---|---|---|
| committer | Michael Vogt <michael.vogt@ubuntu.com> | 2008-11-03 11:47:49 +0100 |
| commit | 3210127e509e8d0e649d019a6d30de04bbb6fd49 (patch) | |
| tree | bf84beeae47cb3f10af6322d152806b46ec62ddb /python | |
| parent | e7811c1935bb36b35bfe0ba30056ac4209a27377 (diff) | |
| parent | fd973539e3ab0a724a69fa9a9eb6b5f2210bb3e1 (diff) | |
| download | python-apt-3210127e509e8d0e649d019a6d30de04bbb6fd49.tar.gz | |
* python/apt_pkgmodule.cc:
- add "SelState{Unknown,Install,Hold,DeInstall,Purge}" constants
* python/metaindex.cc
- fix crash when incorrect attribute is given
* data/templates/Ubuntu.info.in:
- updated
Diffstat (limited to 'python')
| -rw-r--r-- | python/apt_pkgmodule.cc | 6 | ||||
| -rw-r--r-- | python/metaindex.cc | 3 |
2 files changed, 9 insertions, 0 deletions
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); 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) |
