From 02309684f731fe5afcb9935f921cb9b6cd0f8d78 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Martin=20v=2E=20L=C3=B6wis?= Date: Wed, 3 Sep 2003 05:15:20 +0000 Subject: [PATCH] Catch locale.error as well. Fixes #788378. --- Lib/idlelib/IOBinding.py | 2 +- Misc/NEWS | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Lib/idlelib/IOBinding.py b/Lib/idlelib/IOBinding.py index 0c3ae7f85e14..391be77f53b5 100644 --- a/Lib/idlelib/IOBinding.py +++ b/Lib/idlelib/IOBinding.py @@ -29,7 +29,7 @@ except ImportError: try: import locale locale.setlocale(locale.LC_CTYPE, "") -except ImportError: +except (ImportError, locale.error): pass encoding = "ascii" diff --git a/Misc/NEWS b/Misc/NEWS index ba9684b6f3c3..773923c14063 100644 --- a/Misc/NEWS +++ b/Misc/NEWS @@ -80,6 +80,8 @@ Library IDLE ---- +- Bug #788378: Handle locale.error. + - Bug #774680: IDLE now does not fail to save the file anymore if the Tk buffer is not a Unicode string, yet eol_convention is. -- 2.47.3