Skip to content

Commit 84798b1

Browse files
Fix for nonexistent profiles
1 parent d333629 commit 84798b1

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

qiling/utils.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -420,8 +420,11 @@ def profile_setup(ostype: QL_OS, filename: Optional[str]):
420420

421421
config = ConfigParser(converters={'int': int_converter})
422422

423-
os_profile = pkgutil.get_data(__package__, f'profiles/{ostype.name.lower()}.ql').decode()
424-
config.read_string(os_profile)
423+
try:
424+
os_profile = pkgutil.get_data(__package__, f'profiles/{ostype.name.lower()}.ql').decode()
425+
config.read_string(os_profile)
426+
except FileNotFoundError as e:
427+
pass
425428

426429
if filename:
427430
config.read(filename)

0 commit comments

Comments
 (0)