MCPcopy Create free account
hub / github.com/Drakkar-Software/OctoBot / _set_user_root_from_cli

Function _set_user_root_from_cli

octobot/cli.py:106–111  ·  view source on GitHub ↗
(user_folder: str)

Source from the content-addressed store, hash-verified

104
105
106def _set_user_root_from_cli(user_folder: str) -> None:
107 if not (user_folder and str(user_folder).strip()):
108 raise errors.ConfigError("User folder must be a non-empty path.")
109 if ".." in pathlib.PurePath(user_folder).parts:
110 raise errors.ConfigError("Invalid user folder: parent directory segments are not allowed.")
111 user_root_folder_provider.instance().set_root(os.path.normpath(user_folder))
112
113
114def _log_environment(logger):

Callers 1

Calls 2

set_rootMethod · 0.80
instanceMethod · 0.45

Tested by

no test coverage detected