dbmatch keys can be unicode objects also (#219008)
authorPaul Nasrat <pnasrat@redhat.com>
Wed, 16 May 2007 13:45:24 +0000 (14:45 +0100)
committerPaul Nasrat <pnasrat@redhat.com>
Wed, 16 May 2007 13:45:24 +0000 (14:45 +0100)
Jeremy Katz <katzj@redhat.com>

python/rpmts-py.c

index cc02616..e697303 100644 (file)
@@ -1367,7 +1367,7 @@ fprintf(stderr, "*** rpmts_Match(%p) ts %p\n", s, s->ts);
 
     if (Key) {
 /*@-branchstate@*/
-       if (PyString_Check(Key)) {
+       if (PyString_Check(Key) || PyUnicode_Check(Key)) {
            key = PyString_AsString(Key);
            len = PyString_Size(Key);
        } else if (PyInt_Check(Key)) {