Skip to content

Commit c13f276

Browse files
author
Richard Jones
committed
Fixed ENOENT/WindowsError thing, thanks Juergen Hermann
1 parent f79862c commit c13f276

File tree

2 files changed

+12
-9
lines changed

2 files changed

+12
-9
lines changed

roundup/htmltemplate.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
# BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
1616
# SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
1717
#
18-
# $Id: htmltemplate.py,v 1.35 2001-10-24 00:04:41 richard Exp $
18+
# $Id: htmltemplate.py,v 1.36 2001-10-28 22:51:38 richard Exp $
1919

2020
import os, re, StringIO, urllib, cgi, errno
2121

@@ -483,7 +483,7 @@ def render(self, filterspec={}, filter=[], columns=[], sort=[], group=[],
483483
self.classname+'.filter')).read()
484484
all_filters = self.col_re.findall(filter_template)
485485
except IOError, error:
486-
if error.errno != errno.ENOENT: raise
486+
if error.errno not in (errno.ENOENT, errno.ESRCH): raise
487487
filter_template = None
488488
all_filters = []
489489

@@ -827,6 +827,9 @@ def render(self, form):
827827

828828
#
829829
# $Log: not supported by cvs2svn $
830+
# Revision 1.35 2001/10/24 00:04:41 richard
831+
# Removed the "infinite authentication loop", thanks Roch'e
832+
#
830833
# Revision 1.34 2001/10/23 22:56:36 richard
831834
# Bugfix in filter "widget" placement, thanks Roch'e
832835
#

test/test_init.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
# BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
1616
# SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
1717
#
18-
# $Id: test_init.py,v 1.6 2001-09-29 23:48:06 richard Exp $
18+
# $Id: test_init.py,v 1.7 2001-10-28 22:51:38 richard Exp $
1919

2020
import unittest, os, shutil, errno, imp, sys
2121

@@ -29,17 +29,13 @@ def setUp(self):
2929
try:
3030
shutil.rmtree(self.dirname)
3131
except OSError, error:
32-
if error.errno != errno.ENOENT: raise
33-
except WindowsError, error:
34-
if error.errno != 3: raise
32+
if error.errno not in (errno.ENOENT, errno.ESRCH): raise
3533

3634
def tearDown(self):
3735
try:
3836
shutil.rmtree(self.dirname)
3937
except OSError, error:
40-
if error.errno != errno.ENOENT: raise
41-
except WindowsError, error:
42-
if error.errno != 3: raise
38+
if error.errno not in (errno.ENOENT, errno.ESRCH): raise
4339

4440
class ClassicTestCase(MyTestCase):
4541
backend = 'anydbm'
@@ -140,6 +136,10 @@ def suite():
140136

141137
#
142138
# $Log: not supported by cvs2svn $
139+
# Revision 1.6 2001/09/29 23:48:06 richard
140+
# Bug fix for test_init on Windows.
141+
# More documenation!!
142+
#
143143
# Revision 1.5 2001/08/29 06:23:59 richard
144144
# Disabled the bsddb3 module entirely in the unit testing. See CHANGES for
145145
# details.

0 commit comments

Comments
 (0)