Skip to content

Commit c8d5bf6

Browse files
ZackerySpytzzooba
authored andcommitted
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().
1 parent 4612671 commit c8d5bf6

File tree

3 files changed

+12
-1
lines changed

3 files changed

+12
-1
lines changed

Lib/msilib/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ def start_component(self, component = None, feature = None, flags = None, keyfil
273273
if AMD64:
274274
flags |= 256
275275
if keyfile:
276-
keyid = self.cab.gen_id(self.absolute, keyfile)
276+
keyid = self.cab.gen_id(keyfile)
277277
self.keyfiles[keyfile] = keyid
278278
else:
279279
keyid = None

Lib/test/test_msilib.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,15 @@ def test_get_property_vt_empty(self):
8383
db.Close()
8484
self.addCleanup(unlink, db_path)
8585

86+
def test_directory_start_component_keyfile(self):
87+
db, db_path = init_database()
88+
self.addCleanup(db.Close)
89+
feature = msilib.Feature(db, 0, 'Feature', 'A feature', 'Python')
90+
cab = msilib.CAB('CAB')
91+
dir = msilib.Directory(db, cab, None, TESTFN, 'TARGETDIR',
92+
'SourceDir', 0)
93+
dir.start_component(None, feature, None, 'keyfile')
94+
8695

8796
class Test_make_id(unittest.TestCase):
8897
#http://msdn.microsoft.com/en-us/library/aa369212(v=vs.85).aspx
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
:meth:`msilib.Directory.start_component()` no longer fails if *keyfile* is
2+
not ``None``.

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy