Skip to content

Error when getting updates on older windows instance #19

@arossert

Description

@arossert

I'm trying to get the Windows updates on Windows Server 2012 and getting this error:

In [17]: from windows_tools import updates
In [18]: updates.get_windows_updates_com()
---------------------------------------------------------------------------
com_error                                 Traceback (most recent call last)
Cell In[18], line 1
----> 1 updates.get_windows_updates_com()

File windows_tools\updates\__init__.py:106, in get_windows_updates_com(update_pa
th, filter_duplicates, include_all_states)

File <COMObject CreateUpdateSearcher>:2, in QueryHistory(self, startIndex, Count)

com_error: (-2147352567, 'Exception occurred.', (0, None, None, None, 0, -2145124345), None)

I think that you need to handle errors in get_windows_updates_com so we will at least get the updates from WMI and registry, I will be happy to do a PR if it is acceptable solution by you

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions