diff options
Diffstat (limited to 'python')
| -rw-r--r-- | python/cache.cc | 5 | ||||
| -rw-r--r-- | python/pkgsrcrecords.cc | 2 |
2 files changed, 7 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) { diff --git a/python/pkgsrcrecords.cc b/python/pkgsrcrecords.cc index 5e04f5fc..c698a925 100644 --- a/python/pkgsrcrecords.cc +++ b/python/pkgsrcrecords.cc @@ -89,6 +89,8 @@ static PyObject *PkgSrcRecordsAttr(PyObject *Self,char *Name) return CppPyString(Struct.Last->Maintainer()); else if (strcmp("Section",Name) == 0) return CppPyString(Struct.Last->Section()); + else if (strcmp("Record",Name) == 0) + return CppPyString(Struct.Last->AsStr()); else if (strcmp("Binaries",Name) == 0) { PyObject *List = PyList_New(0); |
