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

_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to