From a55f04dc288466c3d07c088f907f7be7bf52178d Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Thu, 19 Mar 2020 22:36:55 +0200 Subject: [PATCH 1/2] Warn that can't allocate socket for PIO Home --- platformio/commands/home/command.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/platformio/commands/home/command.py b/platformio/commands/home/command.py index 208354bf..229c875e 100644 --- a/platformio/commands/home/command.py +++ b/platformio/commands/home/command.py @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -# pylint: disable=too-many-locals +# pylint: disable=too-many-locals,too-many-statements import mimetypes import socket @@ -63,6 +63,7 @@ def cli(port, host, no_open, shutdown_timeout): from twisted.internet import reactor from twisted.web import server + from twisted.internet.error import CannotListenError from platformio.commands.home.rpc.handlers.app import AppRPC from platformio.commands.home.rpc.handlers.ide import IDERPC @@ -121,6 +122,12 @@ def cli(port, host, no_open, shutdown_timeout): click.echo("") click.echo("Open PlatformIO Home in your browser by this URL => %s" % home_url) + try: + reactor.listenTCP(port, site, interface=host) + except CannotListenError as e: + click.secho(str(e), fg="red", err=True) + already_started = True + if already_started: click.secho( "PlatformIO Home server is already started in another process.", fg="yellow" @@ -129,7 +136,6 @@ def cli(port, host, no_open, shutdown_timeout): click.echo("PIO Home has been started. Press Ctrl+C to shutdown.") - reactor.listenTCP(port, site, interface=host) reactor.run() From 6414e1d9e3bfb7b0fb3e0386db180ff198482c8e Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Thu, 19 Mar 2020 22:37:16 +0200 Subject: [PATCH 2/2] Bump version to 4.3.0 --- HISTORY.rst | 2 +- docs | 2 +- platformio/__init__.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/HISTORY.rst b/HISTORY.rst index ecd4dd04..4771a3c0 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -6,7 +6,7 @@ Release Notes PlatformIO Core 4 ----------------- -4.3.0 (2020-??-??) +4.3.0 (2020-03-19) ~~~~~~~~~~~~~~~~~~ * Initial support for an official `PlatformIO for CLion IDE `__ plugin: diff --git a/docs b/docs index 0af3f530..51b7dd49 160000 --- a/docs +++ b/docs @@ -1 +1 @@ -Subproject commit 0af3f53030196d1e9dec83e380814048ab9948ce +Subproject commit 51b7dd49b703fd6156375a93d4bbb6e0890ecb09 diff --git a/platformio/__init__.py b/platformio/__init__.py index 7df83f59..c5dd8dcc 100644 --- a/platformio/__init__.py +++ b/platformio/__init__.py @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -VERSION = (4, 3, "0rc1") +VERSION = (4, 3, 0) __version__ = ".".join([str(s) for s in VERSION]) __title__ = "platformio"