diff options
| author | Michael Vogt <egon@bottom> | 2007-11-29 12:25:33 +0100 |
|---|---|---|
| committer | Michael Vogt <egon@bottom> | 2007-11-29 12:25:33 +0100 |
| commit | 0fc4aa9466d57ddc4a54191eeb8775e41ad35525 (patch) | |
| tree | 93b7f4e949c3c013309d397de200d058ec7b5af5 /python/tag.cc | |
| parent | be3ddb25ea0baa259f20936f1d7a62cafa019b99 (diff) | |
| parent | abf6c5801c6b162a9dcda5099e8eb746525dc826 (diff) | |
| download | python-apt-0fc4aa9466d57ddc4a54191eeb8775e41ad35525.tar.gz | |
* apt/package.py:
- fix apt.package.Dependency.relation initialization
* python/string.cc:
- fix overflow in SizeToStr()
* python/metaindex.cc:
- added support for the metaIndex objects
* python/sourceslist.cc:
- support new "List" attribute that returns the list of
metaIndex source entries
* python/depcache.cc:
- be more threading friendly
* python/tag.cc
- support "None" as default in
ParseSection(control).get(field, default), LP: #44470
* python/progress.cc:
- fix refcount problem in OpProgress
- fix refcount problem in FetchProgress
- fix refcount problem in CdromProgress
* apt/README.apt:
- fix typo (thanks to Thomas Schoepf, closes: #387787)
* po/fr.po:
- merge update, thanks to Christian Perrier (closes: #435918)
Diffstat (limited to 'python/tag.cc')
| -rw-r--r-- | python/tag.cc | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/python/tag.cc b/python/tag.cc index d0d862c9..4b378a55 100644 --- a/python/tag.cc +++ b/python/tag.cc @@ -78,7 +78,7 @@ static PyObject *TagSecFind(PyObject *Self,PyObject *Args) { char *Name = 0; char *Default = 0; - if (PyArg_ParseTuple(Args,"s|s",&Name,&Default) == 0) + if (PyArg_ParseTuple(Args,"s|z",&Name,&Default) == 0) return 0; const char *Start; @@ -86,10 +86,7 @@ static PyObject *TagSecFind(PyObject *Self,PyObject *Args) if (GetCpp<pkgTagSection>(Self).Find(Name,Start,Stop) == false) { if (Default == 0) - { - Py_INCREF(Py_None); - return Py_None; - } + Py_RETURN_NONE; return PyString_FromString(Default); } return PyString_FromStringAndSize(Start,Stop-Start); |
