Message222458
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. |
|
Date |
User |
Action |
Args |
2014-07-07 12:53:10 | Jeffrey.Armstrong | set | recipients:
+ Jeffrey.Armstrong |
2014-07-07 12:53:10 | Jeffrey.Armstrong | set | messageid: <1404737590.72.0.85327158616.issue21931@psf.upfronthosting.co.za> |
2014-07-07 12:53:10 | Jeffrey.Armstrong | link | issue21931 messages |
2014-07-07 12:53:09 | Jeffrey.Armstrong | create | |
|