From 18106ff1808fbf0abe3eee61a36923b64fa1d05b Mon Sep 17 00:00:00 2001 From: Aivar Annamaa Date: Fri, 2 Jun 2023 20:28:25 +0300 Subject: [PATCH] Fix pipkin directory creation in paste mode (e.g. package installation via WebREPL) --- CHANGELOG.rst | 1 + thonny/vendored_libs/pipkin/bare_metal.py | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 7b2ab00fa..1c4c69bd6 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -25,6 +25,7 @@ Version history * Update several translations * Add en_GB translation * Attempt to overcome "window was deleted before its visibility changed" error +* Fix pipkin directory creation in paste mode (e.g. package installation via WebREPL) 4.1.0b1 (2023-04-23) diff --git a/thonny/vendored_libs/pipkin/bare_metal.py b/thonny/vendored_libs/pipkin/bare_metal.py index 4d2960a3d..4e3d2ba2d 100644 --- a/thonny/vendored_libs/pipkin/bare_metal.py +++ b/thonny/vendored_libs/pipkin/bare_metal.py @@ -247,7 +247,7 @@ def remove_file_if_exists(self, path: str) -> None: dedent( f""" try: - __pipkin_helper.os.stat({path!r}) + __pipkin_helper.os.stat({path!r}) and None except __pipkin_helper.builtins.OSError: pass else: @@ -274,7 +274,7 @@ def mkdir_in_existing_parent_exists_ok(self, path: str) -> None: dedent( f""" try: - __pipkin_helper.os.stat({path!r}) + __pipkin_helper.os.stat({path!r}) and None except __pipkin_helper.builtins.OSError: __pipkin_helper.os.mkdir({path!r}) """