Skip to content

Commit

Permalink
Fix following review: raise if symbol path is not set and skip_symsrv…
Browse files Browse the repository at this point in the history
… is True.
  • Loading branch information
neitsa committed Feb 23, 2023
1 parent 928d261 commit 161de34
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion procmon_parser/symbol_resolver/symbol_resolver.py
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,8 @@ def __init__(self,
Raises:
ValueError:
The provided DLL path is not a valid directory, does not contain the required DLL(s) or the automatic
finder could not find the required DLL.
finder could not find the required DLL. Also raises if `skip_symsrv` is True but _NT_SYMBOL_PATH env.
var. is not set.
RuntimeError:
The initialisation couldn't get the system modules.
"""
Expand Down Expand Up @@ -240,6 +241,8 @@ def __init__(self,
# _NT_SYMBOL_PATH is needed to store symbols locally. If it's not set, we need to set it.
nt_symbol_path = os.environ.get("_NT_SYMBOL_PATH", None)
if nt_symbol_path is None:
if skip_symsrv:
raise ValueError("_NT_SYMBOL_PATH env. var. is not set: you can't skip the symsrv.dll check.")
if symbol_path is None:
# resolve TEMP folder and set it at the symbol path.
symbol_path = "srv*{environ_tmp}*https://msdl.microsoft.com/download/symbols".format(
Expand Down

0 comments on commit 161de34

Please sign in to comment.