From 245ce4d79ad3ffe5caec4e1281a9e3591e960298 Mon Sep 17 00:00:00 2001
From: Sebastien Robin <seb@nexedi.com>
Date: Tue, 25 May 2010 08:47:04 +0000
Subject: [PATCH] increase for python 2.6 the timeout in case there is many
 activities to run. there is not such option to urlopen for python2.4

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@35611 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 product/ERP5Type/tests/runFunctionalTest.py | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/product/ERP5Type/tests/runFunctionalTest.py b/product/ERP5Type/tests/runFunctionalTest.py
index 97c3ce3a2e..120de1c9c7 100755
--- a/product/ERP5Type/tests/runFunctionalTest.py
+++ b/product/ERP5Type/tests/runFunctionalTest.py
@@ -133,7 +133,12 @@ class FunctionalTestRunner:
     # (imitating firefox 3.5.9 here)
     headers = { 'Accept-Charset' : 'ISO-8859-1,utf-8;q=0.7,*;q=0.7' }
     request = urllib2.Request(url, headers=headers)
-    f = urllib2.urlopen(request)
+    # Try to use long timeout, this is needed when there is many
+    # activities runing
+    try:
+      f = urllib2.urlopen(request, timeout=3600)
+    except TypeError:
+      f = urllib2.urlopen(request)
     file_content = f.read()
     f.close()
     return file_content
-- 
2.30.9