From 3c01fdda1457b8c3ebc5bd7b0552584b9c786f32 Mon Sep 17 00:00:00 2001 From: Jeff Forcier Date: Thu, 13 Sep 2012 18:35:12 -0500 Subject: [PATCH] Fix #28: hide interpreter-death threading exceptions (cherry picked from commit 3709d2e02bf67ccc272e1f2311e5db125a922ba0) --- paramiko/transport.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/paramiko/transport.py b/paramiko/transport.py index dd389a8..04680a9 100644 --- a/paramiko/transport.py +++ b/paramiko/transport.py @@ -1530,6 +1530,10 @@ class Transport (threading.Thread): # indefinitely, creating a GC cycle and not letting Transport ever be # GC'd. it's a bug in Thread.) + # Hold reference to 'sys' so we can test sys.modules to detect + # interpreter shutdown. + self.sys = sys + # Required to prevent RNG errors when running inside many subprocess # containers. Random.atfork()