summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorPanu Matilainen <pmatilai@redhat.com>2007-10-22 13:37:02 +0300
committerPanu Matilainen <pmatilai@redhat.com>2007-10-22 13:37:02 +0300
commit549fb4393ed4e95fa8fba16dfc1f00c8df64fbcf (patch)
tree47e2a6e110dd0aaebacc55a8fc859f3f829b6ced /python
parent8d70f186814c8dce2362a803d15bf5fc3149888c (diff)
downloadlibrpm-tizen-549fb4393ed4e95fa8fba16dfc1f00c8df64fbcf.tar.gz
librpm-tizen-549fb4393ed4e95fa8fba16dfc1f00c8df64fbcf.tar.bz2
librpm-tizen-549fb4393ed4e95fa8fba16dfc1f00c8df64fbcf.zip
Use rpmtsGet/SetDBMode() to eliminate needs for _RPMTS_INTERNAL
Diffstat (limited to 'python')
-rw-r--r--python/rpmts-py.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/python/rpmts-py.c b/python/rpmts-py.c
index 756cfbe5c..b0eaf4d66 100644
--- a/python/rpmts-py.c
+++ b/python/rpmts-py.c
@@ -618,14 +618,16 @@ fprintf(stderr, "*** rpmts_Rollback(%p) ts %p\n", s, s->ts);
static PyObject *
rpmts_OpenDB(rpmtsObject * s)
{
+ int dbmode;
if (_rpmts_debug)
fprintf(stderr, "*** rpmts_OpenDB(%p) ts %p\n", s, s->ts);
- if (s->ts->dbmode == -1)
- s->ts->dbmode = O_RDONLY;
+ dbmode = rpmtsGetDBMode(s->ts);
+ if (dbmode == -1)
+ dbmode = O_RDONLY;
- return Py_BuildValue("i", rpmtsOpenDB(s->ts, s->ts->dbmode));
+ return Py_BuildValue("i", rpmtsOpenDB(s->ts, dbmode));
}
/** \ingroup py_c
@@ -639,7 +641,7 @@ if (_rpmts_debug)
fprintf(stderr, "*** rpmts_CloseDB(%p) ts %p\n", s, s->ts);
rc = rpmtsCloseDB(s->ts);
- s->ts->dbmode = -1; /* XXX disable lazy opens */
+ rpmtsSetDBMode(s->ts, -1); /* XXX disable lazy opens */
return Py_BuildValue("i", rc);
}