summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2008-07-22 10:21:34 +0200
committerMichael Vogt <michael.vogt@ubuntu.com>2008-07-22 10:21:34 +0200
commit5d8dd13ab3d1e6845a061a4d5b871dda87ab4753 (patch)
tree3343be5f155eab1c36b33347f9a413e6b94f6bd5 /python
parente365aa1c9166eb6228cc84818ae3dfa075908420 (diff)
parent8e959eb0c05ebabcb806016e0360c128a23b9ec1 (diff)
downloadpython-apt-5d8dd13ab3d1e6845a061a4d5b871dda87ab4753.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)
Diffstat (limited to 'python')
-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) {