From f71a40e6458ca1fcccea7dbdd48eafdcef24d3b6 Mon Sep 17 00:00:00 2001 From: "(no author)" <(no author)@cd1c1023-2f26-0410-ae45-c471fc1f0318> Date: Sun, 6 Jan 2008 11:27:44 +0000 Subject: [PATCH] handle python 2.4 timeout exceptions git-svn-id: http://svn.sabayonlinux.org/projects/entropy/trunk@1010 cd1c1023-2f26-0410-ae45-c471fc1f0318 --- libraries/entropy.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/libraries/entropy.py b/libraries/entropy.py index e40625ae6..69d383856 100644 --- a/libraries/entropy.py +++ b/libraries/entropy.py @@ -3886,7 +3886,13 @@ class urlFetcher: rsx = "x" while rsx != '': - rsx = self.remotefile.read(self.bufferSize) + try: + rsx = self.remotefile.read(self.bufferSize) + except: + # python 2.4 timeouts go here + self.close() + self.status = "-3" + return self.status self.commitData(rsx) if self.showSpeed: self.updateProgress()