[issue21931] Nonsense errors reported by msilib.FCICreate for bad argument

2015-05-17 Thread Jeffrey Armstrong

Jeffrey Armstrong added the comment:

I thought, while I'm here reporting another bug, I'd bump this once more.

There is a patch here, and it corrects clearly broken code.  Should I mark this 
as won't fix?

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21931
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21931] Nonsense errors reported by msilib.FCICreate for bad argument

2015-05-17 Thread Zachary Ware

Zachary Ware added the comment:

I'll try to have a look at this later today, but unfortunately can't
guarantee anything (I don't know C, MSI, or _msi very well).

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21931
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21931] Nonsense errors reported by msilib.FCICreate for bad argument

2015-05-17 Thread Zachary Ware

Changes by Zachary Ware zachary.w...@gmail.com:


--
resolution:  - fixed
stage: patch review - resolved
status: open - closed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21931
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21931] Nonsense errors reported by msilib.FCICreate for bad argument

2015-05-17 Thread Zachary Ware

Zachary Ware added the comment:

It's a simple enough fix, so I went ahead and committed it.  Thanks for the 
patch!

I've created issue24224 to track the addition of tests to test_msilib (for more 
than just this issue).

--
resolution: fixed - 
stage: resolved - patch review
status: closed - open

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21931
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21931] Nonsense errors reported by msilib.FCICreate for bad argument

2015-05-17 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 41281737d71a by Zachary Ware in branch '3.4':
Issue #21931: Fix error handling in msilib.FCICreate().
https://hg.python.org/cpython/rev/41281737d71a

New changeset cb0d1d86215e by Zachary Ware in branch 'default':
Closes #21931: Merge with 3.4
https://hg.python.org/cpython/rev/cb0d1d86215e

--
nosy: +python-dev
resolution:  - fixed
stage: patch review - resolved
status: open - closed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21931
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21931] Nonsense errors reported by msilib.FCICreate for bad argument

2014-11-04 Thread Jeffrey Armstrong

Jeffrey Armstrong added the comment:

There's not much to look into.  If the Python function encounters an argument 
error, it returns an uninitialized integer as an error code.  This patch 
fixes incorrect C code, nothing more.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21931
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21931] Nonsense errors reported by msilib.FCICreate for bad argument

2014-11-04 Thread Martin v . Löwis

Martin v. Löwis added the comment:

Right, the entire patch might be processed in 30 minutes. I won't have these 30 
minutes any time soon.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21931
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21931] Nonsense errors reported by msilib.FCICreate for bad argument

2014-11-03 Thread Martin v . Löwis

Martin v. Löwis added the comment:

I haven't had any time to work on Python in the last year, so it may take some 
more time for me to look into this.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21931
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21931] Nonsense errors reported by msilib.FCICreate for bad argument

2014-11-01 Thread Ezio Melotti

Changes by Ezio Melotti ezio.melo...@gmail.com:


--
stage: needs patch - patch review

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21931
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21931] Nonsense errors reported by msilib.FCICreate for bad argument

2014-09-08 Thread Jeffrey Armstrong

Jeffrey Armstrong added the comment:

Is this patch going to be accepted?  It fixes actual incorrect code in msilib, 
and it seems to have stagnated

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21931
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21931] Nonsense errors reported by msilib.FCICreate for bad argument

2014-07-16 Thread R. David Murray

R. David Murray added the comment:

mslib doesn't have many tests, but it looks like it would be easy enough to add 
one for this?

--
nosy: +r.david.murray

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21931
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21931] Nonsense errors reported by msilib.FCICreate for bad argument

2014-07-12 Thread Ezio Melotti

Ezio Melotti added the comment:

Do you want to propose a patch?

--
components: +Windows
nosy: +ezio.melotti, loewis, steve.dower, tim.golden, zach.ware
stage:  - needs patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21931
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21931] Nonsense errors reported by msilib.FCICreate for bad argument

2014-07-12 Thread Jeffrey Armstrong

Jeffrey Armstrong added the comment:

Attached a patch.  The dangers of using goto...

--
keywords: +patch
Added file: http://bugs.python.org/file35935/_msi.3.4.0.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21931
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21931] Nonsense errors reported by msilib.FCICreate for bad argument

2014-07-07 Thread Jeffrey Armstrong

New submission from Jeffrey Armstrong:

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.

--
components: Extension Modules
messages: 222458
nosy: Jeffrey.Armstrong
priority: normal
severity: normal
status: open
title: Nonsense errors reported by msilib.FCICreate for bad argument
type: behavior
versions: Python 3.4, Python 3.5

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21931
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com