summaryrefslogtreecommitdiff
path: root/python/cache.cc
diff options
context:
space:
mode:
authoregon <egon@debian-vm>2008-07-22 10:33:17 +0200
committeregon <egon@debian-vm>2008-07-22 10:33:17 +0200
commit44d1746f2dd6c055f340f9368d6411a9b6170150 (patch)
tree3343be5f155eab1c36b33347f9a413e6b94f6bd5 /python/cache.cc
parentdad1fa9e646f048542c4a602be5e4bc1366c5b2a (diff)
parent5d8dd13ab3d1e6845a061a4d5b871dda87ab4753 (diff)
downloadpython-apt-44d1746f2dd6c055f340f9368d6411a9b6170150.tar.gz
* data/templates/Debian.info.in:
- s/MatchUri/MatchURI/. Thanks, Gustavo Noronha Silva (closes: #487673) * python/cache.cc: - Throw an exception rather than segfaulting when GetCache() is called before InitSystem() (closes: #369147) * doc/examples/config.py: - Fix config.py --help (closes: #257007) * apt/package.py: - add "isAutoRemovable()" method * python/pkgsrcrecords.cc: - add "Record" attribute to the PkgSrcRecord to access the full source record * debian/rules: - remove the arch-build target, we have bzr-builddeb now
Diffstat (limited to 'python/cache.cc')
-rw-r--r--python/cache.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/python/cache.cc b/python/cache.cc
index 36e49710..66a2c5d9 100644
--- a/python/cache.cc
+++ b/python/cache.cc
@@ -928,6 +928,11 @@ PyObject *TmpGetCache(PyObject *Self,PyObject *Args)
if (PyArg_ParseTuple(Args, "|O", &pyCallbackInst) == 0)
return 0;
+ if (_system == 0) {
+ PyErr_SetString(PyExc_ValueError,"_system not initialized");
+ return 0;
+ }
+
pkgCacheFile *Cache = new pkgCacheFile();
if(pyCallbackInst != 0) {