summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2007-11-29 12:07:01 +0100
committerMichael Vogt <michael.vogt@ubuntu.com>2007-11-29 12:07:01 +0100
commitef9c8e692fd184824d29cba42c26daa9b20bdfdb (patch)
treef7f2073c00511550e921e837d9056a72bcdcc4a5
parent9fa44c4a7c9ba0b856858b268445bd0f87ee58ae (diff)
downloadpython-apt-ef9c8e692fd184824d29cba42c26daa9b20bdfdb.tar.gz
* python/tag.cc
- support "None" as default in ParseSection(control).get(field, default), LP: #44470
-rw-r--r--debian/changelog7
-rw-r--r--python/tag.cc7
2 files changed, 7 insertions, 7 deletions
diff --git a/debian/changelog b/debian/changelog
index 538ee2c3..0e80122f 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,4 +1,4 @@
-python-apt (0.7.4) UNRELEASED; urgency=low
+python-apt (0.7.4) unstable; urgency=low
* apt/debfile.py:
- added wrapper around apt_inst.debExtract()
@@ -19,12 +19,15 @@ python-apt (0.7.4) UNRELEASED; urgency=low
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
- -- Michael Vogt <michael.vogt@ubuntu.com> Mon, 30 Jul 2007 22:33:59 +0200
+ -- Michael Vogt <michael.vogt@ubuntu.com> Thu, 29 Nov 2007 11:52:43 +0100
python-apt (0.7.3.1) unstable; urgency=low
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);