def workdir_loaded(func):
@wraps(func)<EOL>def decorator(workdir, *args, **kwargs):<EOL><INDENT>if not workdir.loaded:<EOL><INDENT>workdir.load()<EOL><DEDENT>return func(workdir, *args, **kwargs)<EOL><DEDENT>return decorator<EOL>
Decorator to make sure that the workdir is loaded when calling the
decorated function