File tree Expand file tree Collapse file tree 2 files changed +0
-24
lines changed
Expand file tree Collapse file tree 2 files changed +0
-24
lines changed Original file line number Diff line number Diff line change 44
55import binascii
66import logging
7- import msilib
87import os
98import shutil
109import tempfile
@@ -327,28 +326,6 @@ def get_version(path: str):
327326 return version
328327
329328
330- def get_msi_property (path : str , property : str ) -> str :
331- """Reads a property from msi metadata database of a file.
332-
333- Args:
334- path: The path to the file.
335- property: The property to read.
336- Returns:
337- The string value of the property on successful read, None otherwise.
338- """
339- value = None
340- try :
341- db = msilib .OpenDatabase (path , msilib .MSIDBOPEN_READONLY )
342- view = db .OpenView ("SELECT Value FROM Property WHERE Property='" + property + "'" )
343- view .Execute (None )
344- result = view .Fetch ()
345- value = result .GetString (1 )
346- except :
347- logging .exception (f"Can't read property '{ property } ' from file '{ path } '." )
348- logging .info (f"Read value '{ value } ' for property '{ property } ' from file '{ path } '." )
349- return value
350-
351-
352329@contextmanager
353330def file_in_zip (zipname , peek_at_filename : str ):
354331 """
Original file line number Diff line number Diff line change @@ -12,5 +12,4 @@ pyepics
1212epicscorelibs
1313certifi # Needed in order for requests to find https certificates
1414requests
15- python-msilib # Short term hack, msilib is deprecated and removed from python (see https://peps.python.org/pep-0594/#msilib)
1615mysql-connector-python == 8.4.0
You can’t perform that action at this time.
0 commit comments