[issue20486] msilib: can't close opened database

Игорь Шаула report at bugs.python.org
Sun Feb 2 16:37:29 CET 2014


New submission from Игорь Шаула:

In Python 2.7.6 can't find any way to close MSI database after finish working with it.
As a result database is locked and can't be opened by any other application until Python process is finished.

    import msilib
    db = msilib.OpenDatabase('test.msi', msilib.MSIDBOPEN_TRANSACT)
    view = db.OpenView("SELECT File, Component_, FileName FROM File")
    view.Execute(None)
    r1 = view.Fetch()
    r1.SetString(3,"test.txt")
    view.Modify(msilib.MSIMODIFY_UPDATE, r1)
    view.Close()
    db.Commit()
    del db
    db2 = msilib.OpenDatabase('test.msi', msilib.MSIDBOPEN_TRANSACT)

    MSIError: 1: 2203 2: test.msi 3: -2147287008

----------
components: Library (Lib), Windows
messages: 209992
nosy: gentoo90
priority: normal
severity: normal
status: open
title: msilib: can't close opened database
type: behavior
versions: Python 2.7

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue20486>
_______________________________________


More information about the Python-bugs-list mailing list