Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 1 addition & 11 deletions sdks/python/pmxt/server_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,17 +62,7 @@ def __init__(self, base_url: str = "http://localhost:3847") -> None:
"""
self.base_url = base_url
self.lock_path = Path.home() / '.pmxt' / 'server.lock'
self._port = self._extract_port_from_url(base_url)

def _extract_port_from_url(self, url: str) -> int:
"""Extract port number from URL."""
try:
from urllib.parse import urlparse
parsed = urlparse(url)
return parsed.port or self.DEFAULT_PORT
except (ValueError, AttributeError):
return self.DEFAULT_PORT


def ensure_server_running(self) -> None:
"""
Ensure the PMXT server is running.
Expand Down