mirror of
https://github.com/python/cpython.git
synced 2025-11-01 10:45:30 +00:00
bpo-12239: Make GetProperty() return None for VT_EMPTY (GH-4539)
The previous behavior was to raise an exception
NotImplementedError: result of type 0
when the value of the property is VT_EMPTY.
This commit is contained in:
parent
9e87e7776f
commit
19fb134185
3 changed files with 11 additions and 0 deletions
|
|
@ -53,6 +53,13 @@ class MsiDatabaseTestCase(unittest.TestCase):
|
|||
msilib.OpenDatabase(db_path, msilib.MSIDBOPEN_CREATE)
|
||||
self.assertEqual(str(cm.exception), 'create failed')
|
||||
|
||||
def test_get_property_vt_empty(self):
|
||||
db, db_path = init_database()
|
||||
summary = db.GetSummaryInformation(0)
|
||||
self.assertIsNone(summary.GetProperty(msilib.PID_SECURITY))
|
||||
db.Close()
|
||||
self.addCleanup(unlink, db_path)
|
||||
|
||||
|
||||
class Test_make_id(unittest.TestCase):
|
||||
#http://msdn.microsoft.com/en-us/library/aa369212(v=vs.85).aspx
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue