classification
Title: msilib VT_EMPTY SummaryInformation properties raise an error (suggest returning None)
Type: behavior Stage: resolved
Components: Windows Versions: Python 3.7, Python 3.6
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: BreamoreBoy, berker.peksag, loewis, markm, steve.dower
Priority: normal Keywords: patch

Created on 2011-06-02 14:13 by markm, last changed 2017-11-24 16:05 by berker.peksag. This issue is now closed.

Files
File name Uploaded Description Edit
support_vt_empty_in_summary_getproperty.patch markm, 2011-06-12 01:20 Patch to return None for VT_EMPTY properties of SummaryInformation review
Pull Requests
URL Status Linked Edit
PR 4539 merged berker.peksag, 2017-11-24 11:13
PR 4543 merged berker.peksag, 2017-11-24 15:19
Messages (5)
msg137478 - (view) Author: Mark Mc Mahon (markm) * Date: 2011-06-02 14:13
Using "some.msi" where the first property is VT_EMPTY

Using COM:
>>> from win32com.client import gencache
>>> com_lib = gencache.EnsureModule('{000C1092-0000-0000-C000-000000000046}', 409, 1, 0)
>>> com_msi = com_lib.Installer()
>>> db = com_msi.OpenDatabase('some.msi', 0)
>>> si = db.GetSummaryInformation(0)
>>> repr(si.Property(0))
'None'

Using msilib:
>>> import msilib
>>> db = msilib.OpenDatabase(r'some.msi', 0)
>>> si = db.GetSummaryInformation(0)
>>> si.GetProperty(0)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
NotImplementedError: result of type 0

I aim to submit a patch that so that SummaryInformation.GetProperty() with a type of VT_EMPTY will return None.
msg235997 - (view) Author: Mark Lawrence (BreamoreBoy) * Date: 2015-02-14 22:06
Can we have a patch review please.
msg306899 - (view) Author: Berker Peksag (berker.peksag) * (Python committer) Date: 2017-11-24 15:11
New changeset 19fb134185ce155bc53f517116fca73093ba55e9 by Berker Peksag in branch 'master':
bpo-12239: Make GetProperty() return None for VT_EMPTY (GH-4539)
https://github.com/python/cpython/commit/19fb134185ce155bc53f517116fca73093ba55e9
msg306901 - (view) Author: Berker Peksag (berker.peksag) * (Python committer) Date: 2017-11-24 16:04
New changeset 412f00b839eae2bc07ca08a8e615c3d7dc870646 by Berker Peksag in branch '3.6':
[3.6] bpo-12239: Make GetProperty() return None for VT_EMPTY (GH-4539)
https://github.com/python/cpython/commit/412f00b839eae2bc07ca08a8e615c3d7dc870646
msg306903 - (view) Author: Berker Peksag (berker.peksag) * (Python committer) Date: 2017-11-24 16:05
Thanks for the patch, Mark. I updated the test code and commit it to 3.6 and master branches.
History
Date User Action Args
2017-11-24 16:05:42berker.peksagsetstatus: open -> closed
versions: + Python 3.6, Python 3.7, - Python 3.4, Python 3.5
messages: + msg306903

resolution: fixed
stage: patch review -> resolved
2017-11-24 16:04:42berker.peksagsetmessages: + msg306901
2017-11-24 15:19:47berker.peksagsetpull_requests: + pull_request4476
2017-11-24 15:11:20berker.peksagsetmessages: + msg306899
2017-11-24 11:13:44berker.peksagsetstage: needs patch -> patch review
pull_requests: + pull_request4473
2017-11-19 07:05:32berker.peksagsetnosy: + berker.peksag
2015-02-14 23:13:55brian.curtinsetnosy: - brian.curtin
2015-02-14 22:06:11BreamoreBoysetnosy: + BreamoreBoy
messages: + msg235997
2014-06-24 03:08:44BreamoreBoysetnosy: + loewis, steve.dower

versions: + Python 3.4, Python 3.5, - Python 3.1, Python 2.7, Python 3.2
2011-06-12 01:20:59markmsetfiles: + support_vt_empty_in_summary_getproperty.patch
keywords: + patch
2011-06-02 14:14:49brian.curtinsetstage: needs patch
type: behavior
versions: + Python 3.1, Python 2.7
2011-06-02 14:14:08brian.curtinsetnosy: + brian.curtin
2011-06-02 14:13:43markmcreate