Pdbconv: Make symbol server URL constant

This removes the hard-coded symbol server URL from
`PdbRetreiver.retrieve_pdb` and defines it as a constant within the
`constants` module.
This commit is contained in:
David McDonald
2025-03-06 15:20:38 -06:00
parent 9b0ca1977b
commit 134a3bc686
2 changed files with 3 additions and 1 deletions
@@ -40,6 +40,8 @@ SYMBOL_BASEPATHS = [
ISF_EXTENSIONS = [".json", ".json.xz", ".json.gz", ".json.bz2"]
"""List of accepted extensions for ISF files"""
SYMBOL_SERVER_URL = "http://msdl.microsoft.com/download/symbols"
if hasattr(sys, "frozen") and sys.frozen:
# Ensure we include the executable's directory as the base for plugins and symbols
PLUGINS_PATH = [
@@ -950,7 +950,7 @@ class PdbRetreiver:
) -> Optional[str]:
vollog.info("Download PDB file...")
file_name = ".".join(file_name.split(".")[:-1] + ["pdb"])
for sym_url in ["http://msdl.microsoft.com/download/symbols"]:
for sym_url in [constants.SYMBOL_SERVER_URL]:
url = sym_url + f"/{file_name}/{guid}/"
result = None