MCPcopy Create free account
hub / github.com/NVIDIA/OpenShell / fn

Function fn

e2e/python/test_sandbox_landlock.py:70–80  ·  view source on GitHub ↗
(path)

Source from the content-addressed store, hash-verified

68 """Return a closure that attempts to write a file and returns the result."""
69
70 def fn(path):
71 import os
72
73 try:
74 with open(os.path.join(path, ".landlock-test"), "w") as f:
75 f.write("test")
76 return "OK"
77 except PermissionError:
78 return "EPERM"
79 except OSError as e:
80 return f"ERROR:{e.errno}"
81
82 return fn
83

Callers

nothing calls this directly

Calls 1

writeMethod · 0.45

Tested by

no test coverage detected