MCPcopy Create free account
hub / github.com/Paper2Poster/Paper2Poster / wrapper

Function wrapper

camel/societies/workforce/utils.py:62–69  ·  view source on GitHub ↗
(self, *args, **kwargs)

Source from the content-addressed store, hash-verified

60 def decorator(func):
61 @wraps(func)
62 def wrapper(self, *args, **kwargs):
63 if self._running != running:
64 status = "not running" if running else "running"
65 raise RuntimeError(
66 f"The workforce is {status}. Cannot perform the "
67 f"operation {func.__name__}."
68 )
69 return func(self, *args, **kwargs)
70
71 return wrapper
72

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected