From 6b2ff04bbf86f3a1c404165d6e0517743f41953e Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Fri, 20 Mar 2020 13:01:33 +0200 Subject: [PATCH] Fixed an error "SyntaxError: 'return' with argument inside generator" for PIO Unified Debugger when Python 2.7 is used --- HISTORY.rst | 5 +++++ platformio/commands/debug/server.py | 8 ++++---- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/HISTORY.rst b/HISTORY.rst index 4771a3c0..7f606cf5 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -6,6 +6,11 @@ Release Notes PlatformIO Core 4 ----------------- +4.3.1 (2020-??-??) +~~~~~~~~~~~~~~~~~~ + +* Fixed a "SyntaxError: 'return' with argument inside generator" for PIO Unified Debugger when Python 2.7 is used + 4.3.0 (2020-03-19) ~~~~~~~~~~~~~~~~~~ diff --git a/platformio/commands/debug/server.py b/platformio/commands/debug/server.py index 29a00678..ef06b58c 100644 --- a/platformio/commands/debug/server.py +++ b/platformio/commands/debug/server.py @@ -42,11 +42,11 @@ class DebugServer(BaseProcess): systype = util.get_systype() server = self.debug_options.get("server") if not server: - return None + defer.returnValue(None) server = self.apply_patterns(server, patterns) server_executable = server["executable"] if not server_executable: - return None + defer.returnValue(None) if server["cwd"]: server_executable = join(server["cwd"], server_executable) if ( @@ -83,7 +83,7 @@ class DebugServer(BaseProcess): ) self._debug_port = '| "%s" %s' % (server_executable, str_args) self._debug_port = fs.to_unix_path(self._debug_port) - return self._debug_port + defer.returnValue(self._debug_port) env = os.environ.copy() # prepend server "lib" folder to LD path @@ -120,7 +120,7 @@ class DebugServer(BaseProcess): yield self._wait_until_ready() - return self._debug_port + defer.returnValue(self._debug_port) @defer.inlineCallbacks def _wait_until_ready(self):