From c07e74d5c48e25b2d3f8442a7949fe39907f8bb3 Mon Sep 17 00:00:00 2001 From: Rob Austein Date: Wed, 17 Feb 2010 09:49:24 +0000 Subject: Track Python 2.6 svn path=/rtr-origin/rtr-origin.py; revision=2977 --- rtr-origin/rtr-origin.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/rtr-origin/rtr-origin.py b/rtr-origin/rtr-origin.py index 8e0a54f4..06299598 100644 --- a/rtr-origin/rtr-origin.py +++ b/rtr-origin/rtr-origin.py @@ -669,7 +669,7 @@ class pdu_channel(asynchat.async_chat): """ def __init__(self, conn = None): - asynchat.async_chat.__init__(self, conn = conn) + asynchat.async_chat.__init__(self, conn) self.reader = read_buffer() def start_new_pdu(self): @@ -877,7 +877,8 @@ class client_channel(pdu_channel): well, child will have exited already before this method is called, but we may need to whack it with a stick if something breaks. """ - self.timer.cancel() + if self.timer is not None: + self.timer.cancel() if self.proc is not None and self.proc.returncode is None: try: os.kill(self.proc.pid, self.killsig) -- cgit v1.2.3