summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorJulian Andres Klode <jak@debian.org>2009-06-25 17:13:21 +0200
committerJulian Andres Klode <jak@debian.org>2009-06-25 17:13:21 +0200
commit4f76b8075e8a6acd8fbaad8693ba456a0dcfc836 (patch)
tree72475d41f125887960a395817f36a5aaa536c370 /python
parent35c637e1d9a78fe88c935f3545f98f68b32403f4 (diff)
downloadpython-apt-4f76b8075e8a6acd8fbaad8693ba456a0dcfc836.tar.gz
python/tag.cc: Return False for non-strings in 'TagSection.__contains__()'.
Diffstat (limited to 'python')
-rw-r--r--python/tag.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/python/tag.cc b/python/tag.cc
index 4fcdf067..1ad0a465 100644
--- a/python/tag.cc
+++ b/python/tag.cc
@@ -191,6 +191,8 @@ static PyObject *TagSecExists(PyObject *Self,PyObject *Args)
static int TagSecContains(PyObject *Self,PyObject *Arg)
{
+ if (PyString_Check(Arg) == 0)
+ return 0;
const char *Name = PyString_AsString(Arg);
const char *Start;
const char *Stop;