Skip to content

Commit 97e7c6b

Browse files
committed
remove msilib and unused get_msi_property func
1 parent 367d479 commit 97e7c6b

File tree

2 files changed

+0
-24
lines changed

2 files changed

+0
-24
lines changed

installation_and_upgrade/ibex_install_utils/file_utils.py

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55
import binascii
66
import logging
7-
import msilib
87
import os
98
import shutil
109
import 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
353330
def file_in_zip(zipname, peek_at_filename: str):
354331
"""

installation_and_upgrade/requirements.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,4 @@ pyepics
1212
epicscorelibs
1313
certifi # Needed in order for requests to find https certificates
1414
requests
15-
python-msilib # Short term hack, msilib is deprecated and removed from python (see https://peps.python.org/pep-0594/#msilib)
1615
mysql-connector-python==8.4.0

0 commit comments

Comments
 (0)