Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

msilib VT_EMPTY SummaryInformation properties raise an error (suggest returning None) #56448

Closed
markm mannequin opened this issue Jun 2, 2011 · 5 comments
Closed

msilib VT_EMPTY SummaryInformation properties raise an error (suggest returning None) #56448

markm mannequin opened this issue Jun 2, 2011 · 5 comments
Labels
3.7 (EOL) end of life OS-windows type-bug An unexpected behavior, bug, or error

Comments

@markm
Copy link
Mannequin

markm mannequin commented Jun 2, 2011

BPO 12239
Nosy @loewis, @berkerpeksag, @zooba
PRs
  • bpo-12239: Make GetProperty() return None for VT_EMPTY #4539
  • [3.6] bpo-12239: Make GetProperty() return None for VT_EMPTY (GH-4539) #4543
  • Files
  • support_vt_empty_in_summary_getproperty.patch: Patch to return None for VT_EMPTY properties of SummaryInformation
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = None
    closed_at = <Date 2017-11-24.16:05:42.068>
    created_at = <Date 2011-06-02.14:13:43.916>
    labels = ['type-bug', '3.7', 'OS-windows']
    title = 'msilib VT_EMPTY SummaryInformation properties raise an error (suggest returning None)'
    updated_at = <Date 2017-11-24.16:05:42.065>
    user = 'https://bugs.python.org/markm'

    bugs.python.org fields:

    activity = <Date 2017-11-24.16:05:42.065>
    actor = 'berker.peksag'
    assignee = 'none'
    closed = True
    closed_date = <Date 2017-11-24.16:05:42.068>
    closer = 'berker.peksag'
    components = ['Windows']
    creation = <Date 2011-06-02.14:13:43.916>
    creator = 'markm'
    dependencies = []
    files = ['22332']
    hgrepos = []
    issue_num = 12239
    keywords = ['patch']
    message_count = 5.0
    messages = ['137478', '235997', '306899', '306901', '306903']
    nosy_count = 5.0
    nosy_names = ['loewis', 'BreamoreBoy', 'markm', 'berker.peksag', 'steve.dower']
    pr_nums = ['4539', '4543']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue12239'
    versions = ['Python 3.6', 'Python 3.7']

    @markm
    Copy link
    Mannequin Author

    markm mannequin commented Jun 2, 2011

    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.

    @markm markm mannequin added the OS-windows label Jun 2, 2011
    @briancurtin briancurtin added the type-bug An unexpected behavior, bug, or error label Jun 2, 2011
    @BreamoreBoy
    Copy link
    Mannequin

    BreamoreBoy mannequin commented Feb 14, 2015

    Can we have a patch review please.

    @berkerpeksag
    Copy link
    Member

    New changeset 19fb134 by Berker Peksag in branch 'master':
    bpo-12239: Make GetProperty() return None for VT_EMPTY (GH-4539)
    19fb134

    @berkerpeksag
    Copy link
    Member

    New changeset 412f00b by Berker Peksag in branch '3.6':
    [3.6] bpo-12239: Make GetProperty() return None for VT_EMPTY (GH-4539)
    412f00b

    @berkerpeksag
    Copy link
    Member

    Thanks for the patch, Mark. I updated the test code and commit it to 3.6 and master branches.

    @berkerpeksag berkerpeksag added the 3.7 (EOL) end of life label Nov 24, 2017
    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    3.7 (EOL) end of life OS-windows type-bug An unexpected behavior, bug, or error
    Projects
    None yet
    Development

    No branches or pull requests

    2 participants