diff options
| author | Michael Vogt <michael.vogt@ubuntu.com> | 2008-07-22 10:21:34 +0200 |
|---|---|---|
| committer | Michael Vogt <michael.vogt@ubuntu.com> | 2008-07-22 10:21:34 +0200 |
| commit | 5d8dd13ab3d1e6845a061a4d5b871dda87ab4753 (patch) | |
| tree | 3343be5f155eab1c36b33347f9a413e6b94f6bd5 /python | |
| parent | e365aa1c9166eb6228cc84818ae3dfa075908420 (diff) | |
| parent | 8e959eb0c05ebabcb806016e0360c128a23b9ec1 (diff) | |
| download | python-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.cc | 5 |
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) { |
