This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Jeffrey.Armstrong
Recipients Jeffrey.Armstrong
Date 2014-07-07.12:53:09
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1404737590.72.0.85327158616.issue21931@psf.upfronthosting.co.za>
In-reply-to
Content
The function fcicreate in PC/_msi.c can return nonsense if the list of files passed to msilib.FCICreate does not contains tuples as expected.  To replicate,

import msilib
msilib.FCICreate("test.cab", ["entry.txt"])

The above code will return a ValueError of the format:

ValueError: FCI error 11260524

The error code is meaningless.  If one were to examine the code, you can see in PC/_msi.c:246 (in "current"):


        if (!PyArg_ParseTuple(item, "ss", &filename, &cabname))
            goto err;

If we look at the error handler at PC/_msi.c:262, it assumes that one of the Windows MSI API calls had failed, and will print the contents of the ERF error structure:

err:
    PyErr_Format(PyExc_ValueError, "FCI error %d", erf.erfOper); /* XXX better error type */

In the case where the list does not contain tuples, the value of erf.erfOper was never initialized or set because the error being raised is not due to the Windows MSI API.  The error is highly misleading as it is simply an argument error.
History
Date User Action Args
2014-07-07 12:53:10Jeffrey.Armstrongsetrecipients: + Jeffrey.Armstrong
2014-07-07 12:53:10Jeffrey.Armstrongsetmessageid: <1404737590.72.0.85327158616.issue21931@psf.upfronthosting.co.za>
2014-07-07 12:53:10Jeffrey.Armstronglinkissue21931 messages
2014-07-07 12:53:09Jeffrey.Armstrongcreate