summaryrefslogtreecommitdiff
path: root/python/header-py.c
diff options
context:
space:
mode:
authorPanu Matilainen <pmatilai@redhat.com>2007-06-11 10:37:40 +0300
committerPanu Matilainen <pmatilai@redhat.com>2007-06-11 10:37:40 +0300
commitcb55ab4c3584422612e8586a9398dc5f9d6955ea (patch)
tree583a2b9153a69b61dda472eb916152790155bf06 /python/header-py.c
parent07b45099bbaf51d5a92516be06245be7e44972c9 (diff)
downloadrpm-cb55ab4c3584422612e8586a9398dc5f9d6955ea.tar.gz
rpm-cb55ab4c3584422612e8586a9398dc5f9d6955ea.tar.bz2
rpm-cb55ab4c3584422612e8586a9398dc5f9d6955ea.zip
Treat null epoch equal to zero epoch in python labelCompare (rhbz#227860).
Patch from JBJ.
Diffstat (limited to 'python/header-py.c')
-rw-r--r--python/header-py.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/python/header-py.c b/python/header-py.c
index 24c485b91..67d34ebeb 100644
--- a/python/header-py.c
+++ b/python/header-py.c
@@ -1065,6 +1065,9 @@ PyObject * labelCompare (PyObject * self, PyObject * args)
&e1, &v1, &r1, &e2, &v2, &r2))
return NULL;
+ if (e1 == NULL) e1 = "0";
+ if (e2 == NULL) e2 = "0";
+
rc = compare_values(e1, e2);
if (!rc) {
rc = compare_values(v1, v2);