MCPcopy Create free account
hub / github.com/omkarcloud/botasaurus / clean_base_path

Function clean_base_path

bota/src/bota/vm.py:764–774  ·  view source on GitHub ↗
(api_base_path)

Source from the content-addressed store, hash-verified

762 click.echo(f"Hurray! your desktop app is up and running. Visit http://{ip}{api_base_path or '/'} to see the API Docs.")
763
764def clean_base_path(api_base_path):
765 api_base_path = os.path.normpath(api_base_path) if api_base_path else ""
766
767 if api_base_path == ".":
768 api_base_path = ""
769 elif api_base_path:
770 if not api_base_path.startswith("/"):
771 api_base_path = "/" + api_base_path
772 if api_base_path.endswith("/"):
773 api_base_path = api_base_path[:-1]
774 return api_base_path
775
776def delete_installer(default_name):
777 if os.path.exists(default_name):

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected