A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2012-March/117665.html below:

[Python-Dev] cpython: Issue #14200: Idle shell crash on printing non-BMP unicode character.

[Python-Dev] cpython: Issue #14200: Idle shell crash on printing non-BMP unicode character.Georg Brandl g.brandl at gmx.net
Wed Mar 14 21:52:44 CET 2012
On 14.03.2012 21:46, andrew.svetlov wrote:

> diff --git a/Lib/idlelib/rpc.py b/Lib/idlelib/rpc.py
> --- a/Lib/idlelib/rpc.py
> +++ b/Lib/idlelib/rpc.py
> @@ -196,8 +196,12 @@
>                   return ("ERROR", "Unsupported message type: %s" % how)
>           except SystemExit:
>               raise
> +        except KeyboardInterrupt:
> +            raise
>           except socket.error:
>               raise
> +        except Exception as ex:
> +            return ("CALLEXC", ex)
>           except:
>               msg = "*** Internal Error: rpc.py:SocketIO.localcall()\n\n"\
>                     " Object: %s \n Method: %s \n Args: %s\n"

It appears that this would be better written as

except socket.error:
     raise
except Exception:
     return ("CALLEXC", ex)
except:  # BaseException, i.e. SystemExit, KeyboardInterrupt, GeneratorExit
     raise

Georg

More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4