Fixed missed changes in last commit.

This commit is contained in:
Andrew Hamilton 2021-12-15 00:22:19 +10:00
parent 2c3043c633
commit 45a751903b

View file

@ -1071,14 +1071,14 @@ def chdir(path):
def source_checksum(): def source_checksum():
resources = ["__main__.py", "tools.py"] resources = ["__main__.py", "tools.py"]
if "config" not in os.environ: if "ERIS_CONFIG" not in os.environ:
resources.append("tools.toml") resources.append("tools.toml")
checksum_paths = [] checksum_paths = []
for resource in resources: for resource in resources:
with importlib.resources.path(eris, resource) as resource_path: with importlib.resources.path(eris, resource) as resource_path:
checksum_paths.append(resource_path) checksum_paths.append(resource_path)
if "config" in os.environ: if "ERIS_CONFIG" in os.environ:
checksum_paths.append(os.environ["config"]) checksum_paths.append(os.environ["ERIS_CONFIG"])
sha256 = hashlib.sha256() sha256 = hashlib.sha256()
for path in checksum_paths: for path in checksum_paths:
with open(path, "rb") as source_file: with open(path, "rb") as source_file: