runtime-sdk 0.4.29__tar.gz → 0.4.30__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: runtime-sdk
3
- Version: 0.4.29
3
+ Version: 0.4.30
4
4
  Summary: Runtime Python SDK and CLI
5
5
  Project-URL: Repository, https://github.com/The-Money-Company-Limited/runtimevm
6
6
  Project-URL: Issues, https://github.com/The-Money-Company-Limited/runtimevm/issues
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "runtime-sdk"
3
- version = "0.4.29"
3
+ version = "0.4.30"
4
4
  description = "Runtime Python SDK and CLI"
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.11"
@@ -2101,10 +2101,18 @@ def handle_create(
2101
2101
  label = "creating computer…"
2102
2102
  if startup_command is not None:
2103
2103
  label = f"creating computer and starting app on port {port}…"
2104
- result = _with_spinner(
2105
- label,
2106
- lambda: client.create_computer(slug=name, command=startup_command, cwd=cwd, port=port),
2107
- )
2104
+ try:
2105
+ result = _with_spinner(
2106
+ label,
2107
+ lambda: client.create_computer(slug=name, command=startup_command, cwd=cwd, port=port),
2108
+ )
2109
+ except RuntimeAPIError as exc:
2110
+ if exc.status_code == 409 and "slug already in use" in str(exc) and name:
2111
+ return report_error(
2112
+ f"computer name {name!r} is already in use. Names become public URL slugs and must be unique across active and cold computers. Pick it from `runtime list`, delete it, or choose a different name.",
2113
+ status_code=exc.status_code,
2114
+ )
2115
+ raise
2108
2116
 
2109
2117
  def render(payload: dict[str, Any]) -> None:
2110
2118
  _render_computer_panel(payload, title="created")
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: runtime-sdk
3
- Version: 0.4.29
3
+ Version: 0.4.30
4
4
  Summary: Runtime Python SDK and CLI
5
5
  Project-URL: Repository, https://github.com/The-Money-Company-Limited/runtimevm
6
6
  Project-URL: Issues, https://github.com/The-Money-Company-Limited/runtimevm/issues
File without changes
File without changes