Commit c8d5bf6c authored by Zackery Spytz's avatar Zackery Spytz Committed by Steve Dower

bpo-12639: msilib.Directory.start_component() fails if *keyfile* is not None (GH-13688)

msilib.Directory.start_component() was passing an extra argument to CAB.gen_id().
parent 4612671d
......@@ -273,7 +273,7 @@ class Directory:
if AMD64:
flags |= 256
if keyfile:
keyid = self.cab.gen_id(self.absolute, keyfile)
keyid = self.cab.gen_id(keyfile)
self.keyfiles[keyfile] = keyid
else:
keyid = None
......
......@@ -83,6 +83,15 @@ class MsiDatabaseTestCase(unittest.TestCase):
db.Close()
self.addCleanup(unlink, db_path)
def test_directory_start_component_keyfile(self):
db, db_path = init_database()
self.addCleanup(db.Close)
feature = msilib.Feature(db, 0, 'Feature', 'A feature', 'Python')
cab = msilib.CAB('CAB')
dir = msilib.Directory(db, cab, None, TESTFN, 'TARGETDIR',
'SourceDir', 0)
dir.start_component(None, feature, None, 'keyfile')
class Test_make_id(unittest.TestCase):
#http://msdn.microsoft.com/en-us/library/aa369212(v=vs.85).aspx
......
:meth:`msilib.Directory.start_component()` no longer fails if *keyfile* is
not ``None``.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment