[Checkins] SVN: Zope/branches/2.11/ Launchpad #373299: Removed bogus string exception in OFS.CopySupport.
Tres Seaver
tseaver at palladion.com
Thu May 7 12:16:02 EDT 2009
Log message for revision 99798:
Launchpad #373299: Removed bogus string exception in OFS.CopySupport.
Changed:
U Zope/branches/2.11/doc/CHANGES.txt
U Zope/branches/2.11/lib/python/OFS/CopySupport.py
U Zope/branches/2.11/lib/python/OFS/tests/testCopySupport.py
-=-
Modified: Zope/branches/2.11/doc/CHANGES.txt
===================================================================
--- Zope/branches/2.11/doc/CHANGES.txt 2009-05-07 16:11:44 UTC (rev 99797)
+++ Zope/branches/2.11/doc/CHANGES.txt 2009-05-07 16:16:01 UTC (rev 99798)
@@ -47,6 +47,8 @@
Bugs Fixed
+ - Launchpad #373299: Removed bogus string exception in OFS.CopySupport.
+
- ZPublisher response.setBody: don't append Accept-Encoding to Vary
header if it is already present - this can make cache configuration
difficult. (merged 99493)
Modified: Zope/branches/2.11/lib/python/OFS/CopySupport.py
===================================================================
--- Zope/branches/2.11/lib/python/OFS/CopySupport.py 2009-05-07 16:11:44 UTC (rev 99797)
+++ Zope/branches/2.11/lib/python/OFS/CopySupport.py 2009-05-07 16:16:01 UTC (rev 99798)
@@ -48,7 +48,8 @@
from OFS.interfaces import ICopySource
-CopyError='Copy Error'
+class CopyError(Exception):
+ pass
copy_re = re.compile('^copy([0-9]*)_of_(.*)')
Modified: Zope/branches/2.11/lib/python/OFS/tests/testCopySupport.py
===================================================================
--- Zope/branches/2.11/lib/python/OFS/tests/testCopySupport.py 2009-05-07 16:11:44 UTC (rev 99797)
+++ Zope/branches/2.11/lib/python/OFS/tests/testCopySupport.py 2009-05-07 16:16:01 UTC (rev 99798)
@@ -347,7 +347,7 @@
if ce_regex is not None:
pattern = re.compile( ce_regex, re.DOTALL )
- if pattern.search( e ) is None:
+ if pattern.search(str(e)) is None:
self.fail( "Paste failed; didn't match pattern:\n%s" % e )
else:
@@ -418,8 +418,6 @@
def test_copy_cant_create_target_metatype_not_supported( self ):
- from OFS.CopySupport import CopyError
-
folder1, folder2 = self._initFolders()
folder2.all_meta_types = ()
@@ -449,8 +447,6 @@
def test_move_cant_read_source( self ):
- from OFS.CopySupport import CopyError
-
folder1, folder2 = self._initFolders()
folder2.all_meta_types = FILE_META_TYPES
@@ -469,8 +465,6 @@
def test_move_cant_create_target_metatype_not_supported( self ):
- from OFS.CopySupport import CopyError
-
folder1, folder2 = self._initFolders()
folder2.all_meta_types = ()
@@ -484,8 +478,6 @@
def test_move_cant_create_target_metatype_not_allowed( self ):
- from OFS.CopySupport import CopyError
-
folder1, folder2 = self._initFolders()
folder2.all_meta_types = FILE_META_TYPES
@@ -503,7 +495,6 @@
def test_move_cant_delete_source( self ):
- from OFS.CopySupport import CopyError
from AccessControl.Permissions import delete_objects as DeleteObjects
folder1, folder2 = self._initFolders()
More information about the Checkins
mailing list