From d66094840f30e099f80f5e29a9eff9060dab31e0 Mon Sep 17 00:00:00 2001 From: Hugo Herter Date: Wed, 13 Mar 2024 15:30:20 +0100 Subject: [PATCH] Fix: Assertion errors did not display missing path --- src/aleph/vm/conf.py | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/src/aleph/vm/conf.py b/src/aleph/vm/conf.py index 18bd23b4c..29a5317f3 100644 --- a/src/aleph/vm/conf.py +++ b/src/aleph/vm/conf.py @@ -341,11 +341,17 @@ def check(self): assert self.FAKE_DATA_RUNTIME, "Local runtime .squashfs build not specified" assert self.FAKE_DATA_VOLUME, "Local data volume .squashfs not specified" - assert isdir(self.FAKE_DATA_PROGRAM), "Local fake program directory is missing" - assert isfile(self.FAKE_DATA_MESSAGE), "Local fake message is missing" - assert isdir(self.FAKE_DATA_DATA), "Local fake data directory is missing" - assert isfile(self.FAKE_DATA_RUNTIME), "Local runtime .squashfs build is missing" - assert isfile(self.FAKE_DATA_VOLUME), "Local data volume .squashfs is missing" + assert isdir( + self.FAKE_DATA_PROGRAM + ), f"Local fake program directory is missing, no directory '{self.FAKE_DATA_PROGRAM}'" + assert isfile(self.FAKE_DATA_MESSAGE), f"Local fake message '{self.FAKE_DATA_MESSAGE}' not found" + assert isdir(self.FAKE_DATA_DATA), f"Local fake data directory '{self.FAKE_DATA_DATA}' is missing" + assert isfile( + self.FAKE_DATA_RUNTIME + ), f"Local runtime '{self.FAKE_DATA_RUNTIME}' is missing, did you build it ?" + assert isfile( + self.FAKE_DATA_VOLUME + ), f"Local data volume '{self.FAKE_DATA_VOLUME}' is missing, did you build it ?" assert is_command_available("setfacl"), "Command `setfacl` not found, run `apt install acl`" if self.USE_NDP_PROXY: