From b6556342c27c2b25f7b354fb05a50902a7f69770 Mon Sep 17 00:00:00 2001 From: richard Date: Sun, 28 Oct 2001 22:51:38 +0000 Subject: [PATCH] Fixed ENOENT/WindowsError thing, thanks Juergen Hermann git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/trunk@343 57a73879-2fb5-44c3-a270-3262357dd7e2 --- roundup/htmltemplate.py | 7 +++++-- test/test_init.py | 14 +++++++------- 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/roundup/htmltemplate.py b/roundup/htmltemplate.py index 5610fe1..6f77a9e 100644 --- a/roundup/htmltemplate.py +++ b/roundup/htmltemplate.py @@ -15,7 +15,7 @@ # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE, # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. # -# $Id: htmltemplate.py,v 1.35 2001-10-24 00:04:41 richard Exp $ +# $Id: htmltemplate.py,v 1.36 2001-10-28 22:51:38 richard Exp $ import os, re, StringIO, urllib, cgi, errno @@ -483,7 +483,7 @@ class IndexTemplate(TemplateFunctions): self.classname+'.filter')).read() all_filters = self.col_re.findall(filter_template) except IOError, error: - if error.errno != errno.ENOENT: raise + if error.errno not in (errno.ENOENT, errno.ESRCH): raise filter_template = None all_filters = [] @@ -827,6 +827,9 @@ class NewItemTemplate(TemplateFunctions): # # $Log: not supported by cvs2svn $ +# Revision 1.35 2001/10/24 00:04:41 richard +# Removed the "infinite authentication loop", thanks Roch'e +# # Revision 1.34 2001/10/23 22:56:36 richard # Bugfix in filter "widget" placement, thanks Roch'e # diff --git a/test/test_init.py b/test/test_init.py index e2383cb..74017ba 100644 --- a/test/test_init.py +++ b/test/test_init.py @@ -15,7 +15,7 @@ # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE, # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. # -# $Id: test_init.py,v 1.6 2001-09-29 23:48:06 richard Exp $ +# $Id: test_init.py,v 1.7 2001-10-28 22:51:38 richard Exp $ import unittest, os, shutil, errno, imp, sys @@ -29,17 +29,13 @@ class MyTestCase(unittest.TestCase): try: shutil.rmtree(self.dirname) except OSError, error: - if error.errno != errno.ENOENT: raise - except WindowsError, error: - if error.errno != 3: raise + if error.errno not in (errno.ENOENT, errno.ESRCH): raise def tearDown(self): try: shutil.rmtree(self.dirname) except OSError, error: - if error.errno != errno.ENOENT: raise - except WindowsError, error: - if error.errno != 3: raise + if error.errno not in (errno.ENOENT, errno.ESRCH): raise class ClassicTestCase(MyTestCase): backend = 'anydbm' @@ -140,6 +136,10 @@ def suite(): # # $Log: not supported by cvs2svn $ +# Revision 1.6 2001/09/29 23:48:06 richard +# Bug fix for test_init on Windows. +# More documenation!! +# # Revision 1.5 2001/08/29 06:23:59 richard # Disabled the bsddb3 module entirely in the unit testing. See CHANGES for # details. -- 2.30.2