Skip to content

Commit 6d1482d

Browse files
hoholethanh
authored andcommitted
Doc: Add docstring to settings.setup(), .check()
1 parent f096134 commit 6d1482d

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/aleph/vm/conf.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -317,6 +317,7 @@ def update(self, **kwargs):
317317
raise ValueError(msg)
318318

319319
def check(self):
320+
"""Check that the settings are valid. Call this method after self.setup()."""
320321
assert Path("/dev/kvm").exists(), "KVM not found on `/dev/kvm`."
321322
assert isfile(self.FIRECRACKER_PATH), f"File not found {self.FIRECRACKER_PATH}"
322323
assert isfile(self.JAILER_PATH), f"File not found {self.JAILER_PATH}"
@@ -363,6 +364,7 @@ def check(self):
363364
), "Command `qemu-system-x86_64` not found, run `apt install qemu-system-x86`"
364365

365366
def setup(self):
367+
"""Setup the environment defined by the settings. Call this method after loading the settings."""
366368
os.makedirs(self.MESSAGE_CACHE, exist_ok=True)
367369
os.makedirs(self.CODE_CACHE, exist_ok=True)
368370
os.makedirs(self.RUNTIME_CACHE, exist_ok=True)

0 commit comments

Comments
 (0)