From f05130ee834d60bbcf4245185886342584a3a4f9 Mon Sep 17 00:00:00 2001 From: Emanuele Rocca Date: Mon, 21 Jul 2008 17:30:43 +0200 Subject: * 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) --- python/cache.cc | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'python/cache.cc') 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) { -- cgit v1.2.3